parsedatetime icon indicating copy to clipboard operation
parsedatetime copied to clipboard

Support parsing iso8601 dates

Open emaste opened this issue 12 years ago • 4 comments

YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD formats

>>> import parsedatetime as pdt
>>> cal = pdt.Calendar()
>>> cal.parse('1999-12-24')
(time.struct_time(tm_year=2013, tm_mon=4, tm_mday=4, tm_hour=14, tm_min=2, tm_sec=49, tm_wday=3, tm_yday=94, tm_isdst=1), 0)

emaste avatar Apr 04 '13 18:04 emaste

YYYY-MM-DD is now supported in the latest commit in the master branch, but I was not able to figure out the best way to handle the time and time zone component. The date-only format is handled in a locale-agnostic way since this is meant to be an international date format.

idpaterson avatar Jul 21 '15 13:07 idpaterson

Possibly a related bug? #133

flight16 avatar Oct 19 '15 06:10 flight16

I would like this also. Based on the discussion in #97, parsedatetime is not timezone aware, so it can't fully support ISO 8601.

AgDude avatar Jan 14 '16 13:01 AgDude

Is there any way to specify the date format that parser should only understand, Like it should consider only DD/MM/YYYY but not MM/DD/YYYY ?

ManojDatt avatar Oct 29 '20 15:10 ManojDatt