LotusScript Date time Object: New NotesDateTime ("2017-3-7") - is this in March or July?
What date is to be expected from "New NotesDateTime ("2017-3-7")" ?
According to ISO 8601 (valid in the U.S. too) this would mean 2017 - March - 7th. However, in my German Notes (both, 901 and 10), the result is different (Adding 20 days, returning result via Messagebox is '23.7.2017" - a day in Juli).
To add confusion, both New NotesDateTime ("2017-20-7") and NotesDateTime ("2017-7-20") do not raise an error (silently changes day and month)
=> Errors the developer cannnot find without a lot of effort. => Bannan Software (Customer has to find out) To me, this feels to be more than just a documentation only issue.
Changing the current behave would probably break apps, however, adding and documenting(!) new options would be helpful - e.g. :
New NotesDateTime ("2017-3-7", "YMD" , "-") 'Iso
New NotesDateTime ("2.7.2019", "DMY", ".") 'Example I might do in Germany for 2nd Juli
We would need this for time/date, too, and here this means two different delimiters here - cstr(now) for me at this moment results in 18.08.2019 09:27:53 - (Remember I mgiht be handling any time, not only the current one)
New NotesDateTime ("18.08.2019 09:27:53", "YMDH24MS" , ". :")
(Seperating the date into different parameters for Year, month, day, Hour24, Minute and Second would be another option but would enforce more code on the LotusScript side)
Time Range is most likely affected, too.
Omitting the third parameter (replacing it with OS Settings ) as an addtional(!) Option would be helpful, too.
There is a somewhat related other idea on better ISO 8601 support in this database comming from a different point of view.