:unittest.date2jdate

Test cases for the :date2jdate function

Description: call:unittest.date2jdate
Dependencies: :date2jdate, :Format
Script:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
:unittest.date2jdate
:$created 20080223 :$changed 20090328
:$source https://www.dostips.com
for %%C in (
        "2008 02 23"
        "2008 02 23"
        "2007 12 31"
        "2008 01 01"
        "2008 01 06"
        "2008 01 07"
        "2008 01 08"
        "2008 01 09"
        "100 1 1"
        "99 12 31"
        "0 1 1"
    ) do (
    call:date2jdate s %%~C
    call:Format "[35] [35]." "'%%~C'" "'%%s%%'"
)
EXIT /b
Script Output:
 DOS Script Output
---- :unittest.date2jdate - output
'2008 02 23'                        '2454520'                          .
'2008 02 23'                        '2454520'                          .
'2007 12 31'                        '2454466'                          .
'2008 01 01'                        '2454467'                          .
'2008 01 06'                        '2454472'                          .
'2008 01 07'                        '2454473'                          .
'2008 01 08'                        '2454474'                          .
'2008 01 09'                        '2454475'                          .
'100 1 1'                           '1757585'                          .
'99 12 31'                          '2488069'                          .
'0 1 1'                             '2451545'                          .
----