riesenia / pohoda

XML generator a parser pre Pohodu
34 stars 30 forks source link

OptionsResolver: add nullable date/time normalizers #9

Closed Ciki closed 2 years ago

Ciki commented 5 years ago

I just came across dateOrNull type in spec, so I added it here together with datetime & time variants. Not sure about the implementation and naming consistency (null vs empty string, but this is how Pohoda spec states actually)

segy commented 5 years ago

I searched for that and it's used only 4 times (+ it seems that datetimeOrNull doesn't exist). And all those elements are not mandatory, so you can simply skip setting those properties if you'd like to pass an empty value. So I'm not very convinced to merge this. Do you plan to use this feature in the future?

Ciki commented 5 years ago

I'm aware of that. That's why I hesitated to create this PR :) As it occurs so sporadically we can leave this PR unmerged for now, for those 4 elements I can use custom logic.