]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Add doc section on calender display names.
authorChristopher Lenz <cmlenz@gmail.com>
Fri, 1 Jun 2007 16:15:56 +0000 (16:15 +0000)
committerChristopher Lenz <cmlenz@gmail.com>
Fri, 1 Jun 2007 16:15:56 +0000 (16:15 +0000)
doc/display.txt
doc/style/edgewall.css

index e786c7133efe2c773940c930b8022f7b6e91b654..19bec3dbb7dad56c5e64de993f057b4a51261e6d 100644 (file)
@@ -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
index 36763d806dd2e7d84919e28e9919db5f88131973..5faf796e6cbc0e04d060866acbdef2295f915cc5 100644 (file)
@@ -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; }