Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dates.py 2.1KB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. "Commonly-used date structures"
  2. from django.utils.translation import gettext_lazy as _
  3. from django.utils.translation import pgettext_lazy
  4. WEEKDAYS = {
  5. 0: _("Monday"),
  6. 1: _("Tuesday"),
  7. 2: _("Wednesday"),
  8. 3: _("Thursday"),
  9. 4: _("Friday"),
  10. 5: _("Saturday"),
  11. 6: _("Sunday"),
  12. }
  13. WEEKDAYS_ABBR = {
  14. 0: _("Mon"),
  15. 1: _("Tue"),
  16. 2: _("Wed"),
  17. 3: _("Thu"),
  18. 4: _("Fri"),
  19. 5: _("Sat"),
  20. 6: _("Sun"),
  21. }
  22. MONTHS = {
  23. 1: _("January"),
  24. 2: _("February"),
  25. 3: _("March"),
  26. 4: _("April"),
  27. 5: _("May"),
  28. 6: _("June"),
  29. 7: _("July"),
  30. 8: _("August"),
  31. 9: _("September"),
  32. 10: _("October"),
  33. 11: _("November"),
  34. 12: _("December"),
  35. }
  36. MONTHS_3 = {
  37. 1: _("jan"),
  38. 2: _("feb"),
  39. 3: _("mar"),
  40. 4: _("apr"),
  41. 5: _("may"),
  42. 6: _("jun"),
  43. 7: _("jul"),
  44. 8: _("aug"),
  45. 9: _("sep"),
  46. 10: _("oct"),
  47. 11: _("nov"),
  48. 12: _("dec"),
  49. }
  50. MONTHS_AP = { # month names in Associated Press style
  51. 1: pgettext_lazy("abbrev. month", "Jan."),
  52. 2: pgettext_lazy("abbrev. month", "Feb."),
  53. 3: pgettext_lazy("abbrev. month", "March"),
  54. 4: pgettext_lazy("abbrev. month", "April"),
  55. 5: pgettext_lazy("abbrev. month", "May"),
  56. 6: pgettext_lazy("abbrev. month", "June"),
  57. 7: pgettext_lazy("abbrev. month", "July"),
  58. 8: pgettext_lazy("abbrev. month", "Aug."),
  59. 9: pgettext_lazy("abbrev. month", "Sept."),
  60. 10: pgettext_lazy("abbrev. month", "Oct."),
  61. 11: pgettext_lazy("abbrev. month", "Nov."),
  62. 12: pgettext_lazy("abbrev. month", "Dec."),
  63. }
  64. MONTHS_ALT = { # required for long date representation by some locales
  65. 1: pgettext_lazy("alt. month", "January"),
  66. 2: pgettext_lazy("alt. month", "February"),
  67. 3: pgettext_lazy("alt. month", "March"),
  68. 4: pgettext_lazy("alt. month", "April"),
  69. 5: pgettext_lazy("alt. month", "May"),
  70. 6: pgettext_lazy("alt. month", "June"),
  71. 7: pgettext_lazy("alt. month", "July"),
  72. 8: pgettext_lazy("alt. month", "August"),
  73. 9: pgettext_lazy("alt. month", "September"),
  74. 10: pgettext_lazy("alt. month", "October"),
  75. 11: pgettext_lazy("alt. month", "November"),
  76. 12: pgettext_lazy("alt. month", "December"),
  77. }