formats.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # -*- encoding: utf-8 -*-
  2. # This file is distributed under the same license as the Django package.
  3. #
  4. from __future__ import unicode_literals
  5. # The *_FORMAT strings use the Django date format syntax,
  6. # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  7. DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a de julio 1887'
  8. TIME_FORMAT = 'H:i:s' # '18:59:00'
  9. DATETIME_FORMAT = r'j\-\a \d\e F Y\, \j\e H:i:s' # '26-a de julio 1887, je 18:59:00'
  10. YEAR_MONTH_FORMAT = r'F \d\e Y' # 'julio de 1887'
  11. MONTH_DAY_FORMAT = r'j\-\a \d\e F' # '26-a de julio'
  12. SHORT_DATE_FORMAT = 'Y-m-d' # '1887-07-26'
  13. SHORT_DATETIME_FORMAT = 'Y-m-d H:i:s' # '1887-07-26 18:59:00'
  14. FIRST_DAY_OF_WEEK = 1 # Monday (lundo)
  15. # The *_INPUT_FORMATS strings use the Python strftime format syntax,
  16. # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
  17. DATE_INPUT_FORMATS = (
  18. '%Y-%m-%d', # '1887-07-26'
  19. '%y-%m-%d', # '87-07-26'
  20. '%Y %m %d', # '1887 07 26'
  21. '%d-a de %b %Y', # '26-a de jul 1887'
  22. '%d %b %Y', # '26 jul 1887'
  23. '%d-a de %B %Y', # '26-a de julio 1887'
  24. '%d %B %Y', # '26 julio 1887'
  25. '%d %m %Y', # '26 07 1887'
  26. )
  27. TIME_INPUT_FORMATS = (
  28. '%H:%M:%S', # '18:59:00'
  29. '%H:%M', # '18:59'
  30. )
  31. DATETIME_INPUT_FORMATS = (
  32. '%Y-%m-%d %H:%M:%S', # '1887-07-26 18:59:00'
  33. '%Y-%m-%d %H:%M', # '1887-07-26 18:59'
  34. '%Y-%m-%d', # '1887-07-26'
  35. '%Y.%m.%d %H:%M:%S', # '1887.07.26 18:59:00'
  36. '%Y.%m.%d %H:%M', # '1887.07.26 18:59'
  37. '%Y.%m.%d', # '1887.07.26'
  38. '%d/%m/%Y %H:%M:%S', # '26/07/1887 18:59:00'
  39. '%d/%m/%Y %H:%M', # '26/07/1887 18:59'
  40. '%d/%m/%Y', # '26/07/1887'
  41. '%y-%m-%d %H:%M:%S', # '87-07-26 18:59:00'
  42. '%y-%m-%d %H:%M', # '87-07-26 18:59'
  43. '%y-%m-%d', # '87-07-26'
  44. )
  45. DECIMAL_SEPARATOR = ','
  46. THOUSAND_SEPARATOR = '\xa0' # non-breaking space
  47. NUMBER_GROUPING = 3