Closed mbtools closed 4 years ago
yeah, mmm. YMD only is quite typical for json. I'd better add set_date_time
... but why "you can't get a date that was set before" ? Do you mean get_date + set_date changes the value ?
The following won't work:
In general, I would say the get/set methods should be symmetric. get_date_time, set_date_time would work
But why do you say it is non symmetric ? set_date
produces YYYY-MM-DD
which is then compatible with get_date
you are correct. i had "expires": "2020-06-30 23:59:59"
in a response where get_date didn't work. i removed the (T|$) from my version and all is fine.
Set_date stores YYYY-MM-DD, but get_date requires '^(\d{4})-(\d{2})-(\d{2})(T|$)' with T or $ at the end (same regex in to_abap).
So you can't get a date that was set before. Maybe set_date should store YYYY-MM-DDT00:00:00Z