Re: Wochentag mit DateTime in Deutsch ausgeben
Jens Vagelpohl <[email protected]>
| Newsgroups | gmane.comp.web.zope.german |
|---|---|
| Organization | Zetwork GmbH |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/27/10 12:00 , Peter Nassauer wrote:
> Danke für die schnelle Antwort:
>
> python:DateTime(item_start).strftime('%A')
>
> hatte ich bereits auch versucht. Allerdings erscheint hier der Wochentag
> auch nur in Englisch.
Dann ist bestimmt das locale nicht richtig gesetzt. Dies funktioniert
bei mir einwandfrei:
>>> from DateTime.DateTime import DateTime
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'de_DE')
'de_DE'
>>> DateTime().strftime('%A')
'Samstag'
jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkuJB0kACgkQRAx5nvEhZLIFfgCgkaEdk4RqAUpk2jGwKjKI0iUg
K7oAn1afJxofVHTC/FKClZUEl7UsW2tO
=l7qS
-----END PGP SIGNATURE-----
_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope