Maybe I'm just a knucklehead, but I started out thinking that
DateTime::Duration-compare() would return true if the two durations
were the same, and false if they were not. When that wasn't working,
I looked at the docs and could find nothing to say what it *does*
return. But I noticed
Just a quick question, maybe I just don't understand something. I
have code that compares new and old values of object attributes
before assigning the new value. If the attribute has not been
changed, I don't bother to assign. However, this doesn't work with
DateTime::Duration attributes,
I've refactored the parse_duration() method of DateTime::Format::Pg so
that it's much simpler, and a single Regex supports both ISO and
Postgres-default duration formats. I added a whole slew of tests
extracted from the PostgreSQL tests, too. Patch attached.
applied and committed.
I'll