Documents compare() Return Values

2006-01-06 Thread David Wheeler
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

Comparing DateTime::Duration

2006-01-06 Thread David Wheeler
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,

Re: Refactoring of Format::Pg-parse_duration()

2006-01-06 Thread Daisuke Maki
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