diff doc/display.txt @ 27:8d4cd0856f69

Add doc section on calender display names.
author cmlenz
date Fri, 01 Jun 2007 16:15:56 +0000
parents 2cada72b40ae
children cf94e70a77f3
line wrap: on
line diff
--- a/doc/display.txt
+++ b/doc/display.txt
@@ -50,3 +50,32 @@
 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
Copyright (C) 2012-2017 Edgewall Software