Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/site-packages/django/utils/dates.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1"Commonly-used date structures" 

2 

3from django.utils.translation import gettext_lazy as _ 

4from django.utils.translation import pgettext_lazy 

5 

6WEEKDAYS = { 

7 0: _("Monday"), 

8 1: _("Tuesday"), 

9 2: _("Wednesday"), 

10 3: _("Thursday"), 

11 4: _("Friday"), 

12 5: _("Saturday"), 

13 6: _("Sunday"), 

14} 

15WEEKDAYS_ABBR = { 

16 0: _("Mon"), 

17 1: _("Tue"), 

18 2: _("Wed"), 

19 3: _("Thu"), 

20 4: _("Fri"), 

21 5: _("Sat"), 

22 6: _("Sun"), 

23} 

24MONTHS = { 

25 1: _("January"), 

26 2: _("February"), 

27 3: _("March"), 

28 4: _("April"), 

29 5: _("May"), 

30 6: _("June"), 

31 7: _("July"), 

32 8: _("August"), 

33 9: _("September"), 

34 10: _("October"), 

35 11: _("November"), 

36 12: _("December"), 

37} 

38MONTHS_3 = { 

39 1: _("jan"), 

40 2: _("feb"), 

41 3: _("mar"), 

42 4: _("apr"), 

43 5: _("may"), 

44 6: _("jun"), 

45 7: _("jul"), 

46 8: _("aug"), 

47 9: _("sep"), 

48 10: _("oct"), 

49 11: _("nov"), 

50 12: _("dec"), 

51} 

52MONTHS_AP = { # month names in Associated Press style 

53 1: pgettext_lazy("abbrev. month", "Jan."), 

54 2: pgettext_lazy("abbrev. month", "Feb."), 

55 3: pgettext_lazy("abbrev. month", "March"), 

56 4: pgettext_lazy("abbrev. month", "April"), 

57 5: pgettext_lazy("abbrev. month", "May"), 

58 6: pgettext_lazy("abbrev. month", "June"), 

59 7: pgettext_lazy("abbrev. month", "July"), 

60 8: pgettext_lazy("abbrev. month", "Aug."), 

61 9: pgettext_lazy("abbrev. month", "Sept."), 

62 10: pgettext_lazy("abbrev. month", "Oct."), 

63 11: pgettext_lazy("abbrev. month", "Nov."), 

64 12: pgettext_lazy("abbrev. month", "Dec."), 

65} 

66MONTHS_ALT = { # required for long date representation by some locales 

67 1: pgettext_lazy("alt. month", "January"), 

68 2: pgettext_lazy("alt. month", "February"), 

69 3: pgettext_lazy("alt. month", "March"), 

70 4: pgettext_lazy("alt. month", "April"), 

71 5: pgettext_lazy("alt. month", "May"), 

72 6: pgettext_lazy("alt. month", "June"), 

73 7: pgettext_lazy("alt. month", "July"), 

74 8: pgettext_lazy("alt. month", "August"), 

75 9: pgettext_lazy("alt. month", "September"), 

76 10: pgettext_lazy("alt. month", "October"), 

77 11: pgettext_lazy("alt. month", "November"), 

78 12: pgettext_lazy("alt. month", "December"), 

79}