On Jan 7, 2006, at 3:49 AM, Rick Measham wrote:

Now, if perl had an '===' operator for 'identical' then we could use that to determine if both durations are *always* equal (so maybe we need to add a comparison function for it:

        1 second === 1000000000 nanoseconds
        1 year   === 12 months
        N units  === N units

I'm happy to work on a patch if people want to see this functionality?

That would be fantastic, as it will help me decide if an attribute has been set to a new Duration object, so that I know whether or not to save it to the database.

Of course, this doesn't help me if someone changes the values in the Duration object itself. Ah, well, I'll have to figure that one out, next.

Best,

David

Reply via email to