On Tue, Jun 25, 2002 at 12:21:31PM +0200, M.-A. Lemburg wrote: > >>Just curious: have you taken a look at the mxDateTime parser ? > > > > is that an extension of the rfc822.parsedate approach? > > Yes, but it goes far beyond RFC822 style dates and times. >>> from mx import DateTime >>> dt = DateTime.DateTimeFrom("21/12/2002") >>> dt <DateTime object for '2002-06-25 20:02:00.00' at 819d7f8> >>> dt = DateTime.DateTimeFrom("21/08/2002") >>> dt <DateTime object for '2002-06-25 20:02:00.00' at 819b860> >>> dt = DateTime.DateTimeFrom("21-08-2002") >>> dt <DateTime object for '2021-08-20 00:00:00.00' at 819d7f8> I am not sure I understand the logic. Because of this I always use ISO date format (2002-08-21). Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4