Converting DD MM YYYY into YYYY-MM-DD?

Rami Chowdhury rami.chowdhury at gmail.com
Tue Aug 18 05:22:05 CEST 2009



----
My sample interactive session (locale.setlocale and all) was on a 32-bit Vista 
install of Python 2.5, so it works on that...

---
Rami Chowdhury
"A man with a watch knows what time it is. A man with two watches is never 
sure". -- Segal's Law
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)

On Monday 17 August 2009 19:46:24 Ben Finney wrote:
> 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