diff babel/core.py @ 35:0505d666fa1f

* Import datetime patterns from CLDR. * Make the date/time arguments to the formatting functions optional, defaulting to the current date/time.
author cmlenz
date Mon, 04 Jun 2007 14:28:54 +0000
parents df1e2f0ef627
children 2e143f1a0003
line wrap: on
line diff
--- a/babel/core.py
+++ b/babel/core.py
@@ -397,6 +397,19 @@
         :type: `dict`
         """)
 
+    def datetime_formats(self):
+        return self._data['datetime_formats']
+    datetime_formats = property(datetime_formats, doc="""\
+        Locale patterns for datetime formatting.
+        
+        >>> Locale('en').datetime_formats[None]
+        u'{1} {0}'
+        >>> Locale('th').datetime_formats[None]
+        u'{1}, {0}'
+        
+        :type: `dict`
+        """)
+
 
 def negotiate(preferred, available):
     """Find the best match between available and requested locale strings.
Copyright (C) 2012-2017 Edgewall Software