lestrrat-p5 / DateTime-Format-Pg

Other
2 stars 5 forks source link

parse_interval support for full syntax #7

Closed nbezzala closed 9 years ago

nbezzala commented 9 years ago

Solution for issue https://github.com/lestrrat/DateTime-Format-Pg/issues/5 Still need to add support for frc. I don't really understand what it is, how you are getting it and how that part works.

lestrrat commented 9 years ago

The fact that pre-existing tests needed to be changed kind of bugs me. Does this mean it's going to break existing behavior?

ralesk commented 9 years ago

From what I can see the modified test line was actually buggy (1 day 1 month certainly doesn't mean -1 day), and the commented-out negative data are certainly supported forms by Postgres (9.3 in my case anyway).

If anyone built upon the wrong assumption that '1 day 1 month' has negative day, not sure how to act, their program is probably already broken, and a bug has been fixed. Certainly changes existing behaviour, but that behaviour was bad.

Looks like a nice patch though :)

@nbezzala Does your patch make the module support secondless time forms? Pg seems to be fine with select '12:30'::interval and select '1980-11-22 12:30'::timestamp but last I checked DateTime::Format::Pg croaked on the lack of seconds in the format.

lestrrat commented 9 years ago

@ralesk @nbezzala just give me one more "Everything is OK", and I will do the rest.

nbezzala commented 9 years ago

@ralesk Yes, it supports a duration like '12:30'. And I've added a couple of tests to check. @lestrrat It looks goot to me.

ralesk commented 9 years ago

Anything up with this one? :)

lestrrat commented 9 years ago

hmm, I guess I didn't notice the last email sent to me. Done and done