MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _localized_day

Class _localized_day

tools/python-3.11.9-amd64/Lib/calendar.py:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71class _localized_day:
72
73 # January 1, 2001, was a Monday.
74 _days = [datetime.date(2001, 1, i+1).strftime for i in range(7)]
75
76 def __init__(self, format):
77 self.format = format
78
79 def __getitem__(self, i):
80 funcs = self._days[i]
81 if isinstance(i, slice):
82 return [f(self.format) for f in funcs]
83 else:
84 return funcs(self.format)
85
86 def __len__(self):
87 return 7
88
89
90# Full and abbreviated names of weekdays

Callers 1

calendar.pyFile · 0.85

Calls 1

dateMethod · 0.45

Tested by

no test coverage detected