Intelligent strptime?

Andreas Jung ajung at sz-sb.de
Wed Nov 10 22:11:10 CET 1999


On Wed, Nov 10, 1999 at 08:40:23PM +0100, Gerrit Holl wrote:
> It could return a tuple or something then. But if I want people to choose:
> either input "Nov, 23" or "12/6/99" or "1 December 2000", I don't want to
> check too much. There are much date processing programs (date, I think) that
> do this intelligent. You could also let the above think depend on the timezone,
Depends on your application. Usually the application (server side) sees
the environment of the server and the timezone is fixed for the server.
The standard unix "date" is also not very clever because it can not handle
e.g. german dates like 'date -d "31.12.2000"' IMHO you can not write
a one-fits-all solution without limiting your constraints.


Cheers,
Andreas







More information about the Python-list mailing list