File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,9 +298,12 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
298298 month = day = 1
299299 hour = minute = second = 0
300300 tz = - 1
301+ # Default to -1 to signify that values not known; not critical to have,
302+ # though
301303 week_of_year = - 1
302304 week_of_year_start = - 1
303- # weekday and julian defaulted to -1 so as to signal need to calculate values
305+ # weekday and julian defaulted to -1 so as to signal need to calculate
306+ # values
304307 weekday = julian = - 1
305308 found_dict = found .groupdict ()
306309 for group_key in found_dict .iterkeys ():
@@ -388,7 +391,6 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
388391 # If we know the week of the year and what day of that week, we can figure
389392 # out the Julian day of the year
390393 # Calculations below assume 0 is a Monday
391- # XXX only works for W
392394 if julian == - 1 and week_of_year != - 1 and weekday != - 1 and year != - 1 :
393395 # Adjust for U directive so that calculations are not dependent on
394396 # directive used to figure out week of year
You can’t perform that action at this time.
0 commit comments