Index: Lib/_strptime.py =================================================================== --- Lib/_strptime.py (revision 61677) +++ Lib/_strptime.py (working copy) @@ -338,6 +338,7 @@ # values weekday = julian = -1 found_dict = found.groupdict() + has_year = 0 for group_key in found_dict.iterkeys(): # Directives not explicitly handled below: # c, x, X @@ -345,6 +346,7 @@ # U, W # worthless without day of the week if group_key == 'y': + has_year = 1 year = int(found_dict['y']) # Open Group specification for strptime() states that a %y #value in the range of [00, 68] is in the century 2000, while @@ -354,6 +356,7 @@ else: year += 1900 elif group_key == 'Y': + has_year = 1 year = int(found_dict['Y']) elif group_key == 'm': month = int(found_dict['m']) @@ -425,6 +428,9 @@ else: tz = value break + + if not has_year: + year = datetime_date.today().year # If we know the week of the year and what day of that week, we can figure # out the Julian day of the year. if julian == -1 and week_of_year != -1 and weekday != -1: