From: Christopher Lenz Date: Fri, 1 Jun 2007 16:15:56 +0000 (+0000) Subject: Add doc section on calender display names. X-Git-Tag: 1.0~604 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52afee2cdbb67204272e614961b24034e2e03d6a;p=thirdparty%2Fbabel.git Add doc section on calender display names. --- diff --git a/doc/display.txt b/doc/display.txt index e786c713..19bec3db 100644 --- a/doc/display.txt +++ b/doc/display.txt @@ -50,3 +50,32 @@ key is a code such as the ISO country and language codes. Consult the API documentation for references to the relevant specifications. .. _`number and date formatting`: formatting.html + + +Calender Display Names +====================== + +The `Locale`_ class provides access to many locale display names related to +calendar display, such as the names of week days or months. + +These display names are of course used for date formatting, but can also be +used, for example, to show a list of months to the user in their preferred +language:: + + >>> locale = Locale('es') + >>> month_names = locale.months['format']['wide'].items() + >>> month_names.sort() + >>> for idx, name in month_names: + ... print name + enero + febrero + marzo + abril + mayo + junio + julio + agosto + septiembre + octubre + noviembre + diciembre diff --git a/doc/style/edgewall.css b/doc/style/edgewall.css index 36763d80..5faf796e 100644 --- a/doc/style/edgewall.css +++ b/doc/style/edgewall.css @@ -14,6 +14,7 @@ h1, h2, h3, h4 { h1 { font-size: 19px; margin: 2em 0 .5em; } h2 { font-size: 16px; margin: 1.5em 0 .5em; } h3 { font-size: 14px; margin: 1.2em 0 .5em; } +h1 tt, h2 tt, h3 tt { color: #666; font-size: 100%; } hr { border: none; border-top: 1px solid #ccb; margin: 2em 0; } p { margin: 0 0 1em; }