Closed JorgeLNJunior closed 5 months ago
So I completely missed that the build was failing on here! time.DateOnly
is go1.20+, will bump the version in go.mod
.
...and I can't fix this it would seem. Can you bump the go.mod to 1.20 as that's the requirement for this?
Done.
I forgot the workflow file, now it should pass.
When the year/date tag is a date, it can't be parsed into a number, so the
Year()
method returns a zero value. This PR tries to fix this by checking if theAtoi()
function returns 0. If it does, the string is parsed as a date, and the year is returned. If parsing fails, it still returns zero.