-- VERSION:  1.00  Saturday, October/12/2019

Hi,

DATETIME.EX and DATETIME.BAS are for unit testing Lib2's
library DATETIME.E.

Note that VBDOS is using *Julian* Calendar until 1933 (I assume),
therefore dates before 1933 will NOT be equal, since DATETIME.E
library is using only *Gregorian* Calendar. For example, 1932:

EU_TEST.OUT: {1932,6,4,2,20,13}>>=||1932-Jun-04 Sat 02:20:13||
VB_TEST.OUT: {1932,6,4,2,20,13}>>=||1932-Jun-04 Thu 02:20:13||

EU_TEST.OUT: {1932,6,1,13,4,8}>>=||1932-Jun-01 Wed 13:04:08||
VB_TEST.OUT: {1932,6,1,13,4,8}>>=||1932-Jun-01 Mon 13:04:08||

EU_TEST.OUT: {1932,6,2,22,47,9}>>=||1932-Jun-02 Thu 22:47:09||
VB_TEST.OUT: {1932,6,2,22,47,9}>>=||1932-Jun-02 Tue 22:47:09||

(As you go before 1932, the difference should get bigger and bigger).

The purpose is not to test all features of DATETIME.E library, but to
compare the results of date-time calculations in DATETIME.E with
the results of MS-VBDOS, assuming that Microsoft's VBDOS results are
correct.

For running this test you must have FreeDOS installed, and MS-VBDOS
Professional Edition 1.00 installed in your system's PATH.

DATETIME.EX tests random date-time values, as well as edge date-time,
for example, edge for seconds: -1, 0, 1, 59, 60, 61.

Edge test proves that the way DATETIME.E library is rounding date-time
numbers is correct. Random test proves that date-time calculations are
correct. Now() function is also tested against date().
All tests are tested against atom_to_float64() as well.
All tests are compared to VBDOS (Microsoft Visual Basic for DOS).

This unit testing allows you to run *thousands* of tests in few
seconds, without any effort, to prove the accuracy of DATETIME.E library.
Note that other tests can be done using Euphoria 3.1.1 only (you don't
need VBDOS environment for that).

I've done thousands of tests (in valid VBDOS range) without any error.

- Out of valid VBDOS range the results should be accurate, since the same
  Gregorian Calendar formula is used for any given date-time, forever.


Shian.

P.s. It seems that Euphoria 3.1.1 is much faster then VBDOS...
