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

Method __calc_am_pm

Lib/_strptime.py:134–145  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.f_month = f_month
133
134 def __calc_am_pm(self):
135 # Set self.am_pm by using time.strftime().
136
137 # The magic date (1999,3,17,hour,44,55,2,76,0) is not really that
138 # magical; just happened to have used it everywhere else where a
139 # static date was needed.
140 am_pm = []
141 for hour in (1, 22):
142 time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
143 # br_FR has AM/PM info (' ',' ').
144 am_pm.append(time.strftime("%p", time_tuple).lower().strip())
145 self.am_pm = am_pm
146
147 def __calc_alt_digits(self):
148 # Set self.LC_alt_digits by using time.strftime().

Callers 1

__init__Method · 0.95

Calls 4

appendMethod · 0.45
stripMethod · 0.45
lowerMethod · 0.45
strftimeMethod · 0.45

Tested by

no test coverage detected