I've noticed that YearWeek and other objects have a __toString() method returning an ISO representation of the object, but not the corresponding 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?
Hello there,
I've noticed that
YearWeek
and other objects have a__toString()
method returning an ISO representation of the object, but not the correspondingpublic static function parse(string $iso): self
method. Which leads to multiple usages of*::of()
methods sprouting around in our code (some usingsubstr
, someexplode('-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