VBA-tools / VBA-JSON

JSON conversion and parsing for VBA
MIT License
1.76k stars 568 forks source link

Option to convert dates (also convert back to ISO in ParseJson) #205

Open jonadv opened 3 years ago

jonadv commented 3 years ago

Added an additional user option that lets the user choose if dates should be converted to UTC. Right now, dates are only converted when calling JsonConverter.ConvertToJSON. But not when JsonConverter.ParseJson is called. In addition to the my previous pull request, which fixes the latter, this adds an option to turn it on for both (default, false) or keep the date times as they are.

hecon5 commented 2 years ago

I would prefer a positive option name: LocaliseISOdates ?

FWIW, using a negative in this case allows for it to be the default action because of how JSONOptions initializes (booleans initiate to False).