comparison 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
comparison
equal deleted inserted replaced
26:93eaa2f4a0a2 27:8d4cd0856f69
48 Most of the corresponding ``Locale`` properties return dictionaries, where the 48 Most of the corresponding ``Locale`` properties return dictionaries, where the
49 key is a code such as the ISO country and language codes. Consult the API 49 key is a code such as the ISO country and language codes. Consult the API
50 documentation for references to the relevant specifications. 50 documentation for references to the relevant specifications.
51 51
52 .. _`number and date formatting`: formatting.html 52 .. _`number and date formatting`: formatting.html
53
54
55 Calender Display Names
56 ======================
57
58 The `Locale`_ class provides access to many locale display names related to
59 calendar display, such as the names of week days or months.
60
61 These display names are of course used for date formatting, but can also be
62 used, for example, to show a list of months to the user in their preferred
63 language::
64
65 >>> locale = Locale('es')
66 >>> month_names = locale.months['format']['wide'].items()
67 >>> month_names.sort()
68 >>> for idx, name in month_names:
69 ... print name
70 enero
71 febrero
72 marzo
73 abril
74 mayo
75 junio
76 julio
77 agosto
78 septiembre
79 octubre
80 noviembre
81 diciembre
Copyright (C) 2012-2017 Edgewall Software