Converting DD MM YYYY into YYYY-MM-DD?

Ben Finney ben+python at benfinney.id.au
Mon Aug 17 22:46:24 EDT 2009


Jonathan Gardner <jgardner at jonathangardner.net> writes:

> On Aug 17, 5:20 pm, Ben Finney <ben+pyt... at benfinney.id.au> wrote:
> > Instead, you should generate the map based on the standard library (in
> > this case, the underlying C standard library) locale database
> > <URL:http://docs.python.org/library/locale.html?highlight=locale%20date#lo...>:
>
> Does Windows support POSIX locales?

If it does not, it should :-) since it addresses the problem in one
standard place. It would be foolish for Python to re-implement that
functionality when presumably the operating system already knows how to
map between dates and locale-specific text representations.

You'll need to check the operating system documentation for what
alternative it might provide.

-- 
 \                “I got fired from my job the other day. They said my |
  `\          personality was weird. … That's okay, I have four more.” |
_o__)                                       —Bug-Eyed Earl, _Red Meat_ |
Ben Finney



More information about the Python-list mailing list