'1 day 3 hours ago'

0 views
Skip to first unread message

Oleg Broytmann

unread,
Apr 22, 2009, 12:18:42 PM4/22/09
to ParseDateTime-Dev
Hello! Currently (0.8.7) '1 day 3 hours ago' is parsed as '-1 day +3 hours'.
Shouldn't it be '-1 day -3 hours'? Or should I avoid mixing a few different
units? '1 day ago 3 hours ago' is parsed right.

Oleg.
--
Oleg Broytmann http://phd.webhost.ru/ oleg.br...@gmail.com
Programmers don't die, they just GOSUB without RETURN.

bear

unread,
Apr 22, 2009, 7:38:22 PM4/22/09
to parsedat...@googlegroups.com
yea, that is a current bug - the parser doesn't understand compound
items like humans do.

I need to add handling for that by setting the direction of the offset
once and then using it until it's reset
--
---
Bear

be...@seesmic.com (work)
be...@code-bear.com (jabber & email)
http://code-bear.com/bearlog (weblog)

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

Oleg Broytmann

unread,
Apr 23, 2009, 7:17:34 AM4/23/09
to parsedat...@googlegroups.com
On Wed, Apr 22, 2009 at 07:38:22PM -0400, bear wrote:
> yea, that is a current bug - the parser doesn't understand compound
> items like humans do.
>
> I need to add handling for that by setting the direction of the offset
> once and then using it until it's reset
>
> On Wed, Apr 22, 2009 at 12:18 PM, Oleg Broytmann
> <oleg.br...@gmail.com> wrote:
> >
> > Hello! Currently (0.8.7) '1 day 3 hours ago' is parsed as '-1 day +3 hours'.
> > Shouldn't it be '-1 day -3 hours'? Or should I avoid mixing a few different
> > units? '1 day ago 3 hours ago' is parsed right.

I see. Thank you.

Reply all
Reply to author
Forward
0 new messages