MCPcopy Index your code
hub / github.com/python/cpython / _localized_day

Class _localized_day

Lib/calendar.py:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

calendar.pyFile · 0.85

Calls 1

dateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…