System.Date
Posted: Sun Apr 11, 2021 8:05 am
Embedded Oberon's System.Date runs these checks on input data to set the clock:
However, the year gets encoded into six bits with a 32 bit INTEGER, ie. only allowing years up to 2063. This can easily be checked by entering a year above 2063, which will roll over to a lower value. Also, the day check should include 31.
Hence, I suggest the check should read:
Also
does not seem to work OMM. Before the August 2020 release of EO, "/" was the date delimiter, but was changed to ".", according to the comments in module System. "/" still works, however. FWIW, Texts.WriteClock uses "." as well.
Project Oberon's System.Date does not run any range checks.
Code: Select all
IF (day >= 1) & (day < 31) & (mo >= 1) & (mo <= 12) & (yr >= 2000) & (yr <= 2099) THEN
Hence, I suggest the check should read:
Code: Select all
IF (day >= 1) & (day <= 31) & (mo >= 1) & (mo <= 12) & (yr >= 2000) & (yr <= 2063) THEN
Code: Select all
System.Date 11.04.2021 13:23:33
Project Oberon's System.Date does not run any range checks.