Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Parsing this causes year to be 2012

1 view
Skip to first unread message

Saptarshi Joy Guha

unread,
Mar 27, 2011, 11:20:23 PM3/27/11
to parsedat...@googlegroups.com
Hello,

When i call parse on the following

pdc_p.parse("9:30pm  on 27th March")

I get

((2012, 3, 1, 21, 30, 0, 6, 86, 1), 3)

It seems a bit odd I get 2012. Is there a setting it reads that I can change?

Thank you
Yanger

bear

unread,
Mar 28, 2011, 1:02:26 AM3/28/11
to parsedat...@googlegroups.com

I believe that is similar to Issue 31 and in the trunk version I am
working on a Constant class member value that will behave the same way
that you see at
https://code.google.com/p/parsedatetime/source/browse/trunk/parsedatetime/__init__.py#1671

where you can control if unspecified years are assumed to be always
current year or next year if the month is ahead or behind the current
month.

>
> Thank you
> Yanger
>
> --
> You received this message because you are subscribed to the Google Groups
> "parsedatetime-dev" group.
> To post to this group, send email to parsedat...@googlegroups.com.
> To unsubscribe from this group, send email to
> parsedatetime-...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/parsedatetime-dev?hl=en.
>

--
Bear

be...@xmpp.org (email)
bea...@gmail.com (xmpp, email)
be...@code-bear.com (xmpp, email)
http://code-bear.com/bearlog (weblog)

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

Reply all
Reply to author
Forward
0 new messages