MCPcopy Index your code
hub / github.com/RustPython/RustPython / _localized_day

Class _localized_day

Lib/calendar.py:115–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114
115class _localized_day:
116
117 # January 1, 2001, was a Monday.
118 _days = [datetime.date(2001, 1, i+1).strftime for i in range(7)]
119
120 def __init__(self, format):
121 self.format = format
122
123 def __getitem__(self, i):
124 funcs = self._days[i]
125 if isinstance(i, slice):
126 return [f(self.format) for f in funcs]
127 else:
128 return funcs(self.format)
129
130 def __len__(self):
131 return 7
132
133
134# Full and abbreviated names of weekdays

Callers 1

calendar.pyFile · 0.85

Calls 1

dateMethod · 0.80

Tested by

no test coverage detected