formats.py 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # This file is distributed under the same license as the Django package.
  2. #
  3. # The *_FORMAT strings use the Django date format syntax,
  4. # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  5. DATE_FORMAT = "j F Y" # '20 januari 2009'
  6. TIME_FORMAT = "H:i" # '15:23'
  7. DATETIME_FORMAT = "j F Y H:i" # '20 januari 2009 15:23'
  8. YEAR_MONTH_FORMAT = "F Y" # 'januari 2009'
  9. MONTH_DAY_FORMAT = "j F" # '20 januari'
  10. SHORT_DATE_FORMAT = "j-n-Y" # '20-1-2009'
  11. SHORT_DATETIME_FORMAT = "j-n-Y H:i" # '20-1-2009 15:23'
  12. FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag')
  13. # The *_INPUT_FORMATS strings use the Python strftime format syntax,
  14. # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
  15. DATE_INPUT_FORMATS = [
  16. "%d-%m-%Y", # '20-01-2009'
  17. "%d-%m-%y", # '20-01-09'
  18. "%d/%m/%Y", # '20/01/2009'
  19. "%d/%m/%y", # '20/01/09'
  20. "%Y/%m/%d", # '2009/01/20'
  21. # "%d %b %Y", # '20 jan 2009'
  22. # "%d %b %y", # '20 jan 09'
  23. # "%d %B %Y", # '20 januari 2009'
  24. # "%d %B %y", # '20 januari 09'
  25. ]
  26. # Kept ISO formats as one is in first position
  27. TIME_INPUT_FORMATS = [
  28. "%H:%M:%S", # '15:23:35'
  29. "%H:%M:%S.%f", # '15:23:35.000200'
  30. "%H.%M:%S", # '15.23:35'
  31. "%H.%M:%S.%f", # '15.23:35.000200'
  32. "%H.%M", # '15.23'
  33. "%H:%M", # '15:23'
  34. ]
  35. DATETIME_INPUT_FORMATS = [
  36. # With time in %H:%M:%S :
  37. "%d-%m-%Y %H:%M:%S", # '20-01-2009 15:23:35'
  38. "%d-%m-%y %H:%M:%S", # '20-01-09 15:23:35'
  39. "%Y-%m-%d %H:%M:%S", # '2009-01-20 15:23:35'
  40. "%d/%m/%Y %H:%M:%S", # '20/01/2009 15:23:35'
  41. "%d/%m/%y %H:%M:%S", # '20/01/09 15:23:35'
  42. "%Y/%m/%d %H:%M:%S", # '2009/01/20 15:23:35'
  43. # "%d %b %Y %H:%M:%S", # '20 jan 2009 15:23:35'
  44. # "%d %b %y %H:%M:%S", # '20 jan 09 15:23:35'
  45. # "%d %B %Y %H:%M:%S", # '20 januari 2009 15:23:35'
  46. # "%d %B %y %H:%M:%S", # '20 januari 2009 15:23:35'
  47. # With time in %H:%M:%S.%f :
  48. "%d-%m-%Y %H:%M:%S.%f", # '20-01-2009 15:23:35.000200'
  49. "%d-%m-%y %H:%M:%S.%f", # '20-01-09 15:23:35.000200'
  50. "%Y-%m-%d %H:%M:%S.%f", # '2009-01-20 15:23:35.000200'
  51. "%d/%m/%Y %H:%M:%S.%f", # '20/01/2009 15:23:35.000200'
  52. "%d/%m/%y %H:%M:%S.%f", # '20/01/09 15:23:35.000200'
  53. "%Y/%m/%d %H:%M:%S.%f", # '2009/01/20 15:23:35.000200'
  54. # With time in %H.%M:%S :
  55. "%d-%m-%Y %H.%M:%S", # '20-01-2009 15.23:35'
  56. "%d-%m-%y %H.%M:%S", # '20-01-09 15.23:35'
  57. "%d/%m/%Y %H.%M:%S", # '20/01/2009 15.23:35'
  58. "%d/%m/%y %H.%M:%S", # '20/01/09 15.23:35'
  59. # "%d %b %Y %H.%M:%S", # '20 jan 2009 15.23:35'
  60. # "%d %b %y %H.%M:%S", # '20 jan 09 15.23:35'
  61. # "%d %B %Y %H.%M:%S", # '20 januari 2009 15.23:35'
  62. # "%d %B %y %H.%M:%S", # '20 januari 2009 15.23:35'
  63. # With time in %H.%M:%S.%f :
  64. "%d-%m-%Y %H.%M:%S.%f", # '20-01-2009 15.23:35.000200'
  65. "%d-%m-%y %H.%M:%S.%f", # '20-01-09 15.23:35.000200'
  66. "%d/%m/%Y %H.%M:%S.%f", # '20/01/2009 15.23:35.000200'
  67. "%d/%m/%y %H.%M:%S.%f", # '20/01/09 15.23:35.000200'
  68. # With time in %H:%M :
  69. "%d-%m-%Y %H:%M", # '20-01-2009 15:23'
  70. "%d-%m-%y %H:%M", # '20-01-09 15:23'
  71. "%Y-%m-%d %H:%M", # '2009-01-20 15:23'
  72. "%d/%m/%Y %H:%M", # '20/01/2009 15:23'
  73. "%d/%m/%y %H:%M", # '20/01/09 15:23'
  74. "%Y/%m/%d %H:%M", # '2009/01/20 15:23'
  75. # "%d %b %Y %H:%M", # '20 jan 2009 15:23'
  76. # "%d %b %y %H:%M", # '20 jan 09 15:23'
  77. # "%d %B %Y %H:%M", # '20 januari 2009 15:23'
  78. # "%d %B %y %H:%M", # '20 januari 2009 15:23'
  79. # With time in %H.%M :
  80. "%d-%m-%Y %H.%M", # '20-01-2009 15.23'
  81. "%d-%m-%y %H.%M", # '20-01-09 15.23'
  82. "%d/%m/%Y %H.%M", # '20/01/2009 15.23'
  83. "%d/%m/%y %H.%M", # '20/01/09 15.23'
  84. # "%d %b %Y %H.%M", # '20 jan 2009 15.23'
  85. # "%d %b %y %H.%M", # '20 jan 09 15.23'
  86. # "%d %B %Y %H.%M", # '20 januari 2009 15.23'
  87. # "%d %B %y %H.%M", # '20 januari 2009 15.23'
  88. ]
  89. DECIMAL_SEPARATOR = ","
  90. THOUSAND_SEPARATOR = "."
  91. NUMBER_GROUPING = 3