When a date is provided without a year, it appears that str2time() assumes the current year for some strings, and the previous year for other strings? This behavior should be consistent across all strings without a year, and probably be documented as well.
I don't see any clarification about this in the documentation, so I'm confused what to expect.
str2time("Jan 4 01:04:16"); # Parses as 2023
str2time("Jan 14 01:04:16"); # Parses as 2023
str2time("Jan 24 01:04:16"); # Parses as 2023
str2time("Feb 4 01:04:16"); # Parses as 2022?
str2time("Mar 4 01:04:16"); # Parses as 2022?
str2time("Apr 4 01:04:16"); # Parses as 2022?
str2time("May 4 01:04:16"); # Parses as 2022?
When a date is provided without a year, it appears that
str2time()
assumes the current year for some strings, and the previous year for other strings? This behavior should be consistent across all strings without a year, and probably be documented as well.I don't see any clarification about this in the documentation, so I'm confused what to expect.