fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
5.88k stars 181 forks source link

feat(rewrite-with-pipe): add `isoWeek` action #568

Closed mxdvl closed 3 months ago

mxdvl commented 4 months ago

Part of #502

Note that some years, like 2012, can have 54 weeks.

fabian-hiller commented 3 months ago

Note that some years, like 2012, can have 54 weeks.

Are you sure about that? According to Wikipedia, 53 is the maximum number for leap years.

mxdvl commented 3 months ago

Note that some years, like 2012, can have 54 weeks.

Are you sure about that? According to Wikipedia, 53 is the maximum number for leap years.

Ah of course ISO thought about that! I was simply going by the fact that 2012 had 54 different weeks in it, but in that case 1 January is W52 & 31 December is W01.