date-time
date-time copied to clipboard
YearWeek, YearMonth and Year are missing `public static parse(string $iso): self`
Hello there,
I've noticed that YearWeek, YearMonth and Year each have a __toString() method returning an ISO representation of the object, but none have a public static function parse(string $iso): self method. Which leads to multiple usages of *::of() methods sprouting around in our code (some using substr, some explode('-W'), etc... unpredictable code, no proper error management... nasty things).
Is that something you would be willing to accept as a PR?
Thanks for your answer. gnutix