Reading the documentation for @ Variables, it seems inconsistent for @DAY to come from the established @DATE, yet the other, similarly named variables should be based on the current date.
Variable
|
Read-Only
|
Value
|
@DATE
|
|
Internal date when the program was invoked.
|
@DAY
|
|
Day of month from @DATE.
|
@MONTH
|
|
Current month.
|
@YEAR
|
|
Current year (2 digits).
|
@YEAR4
|
|
Current year (4 digits).
|
The following experiment confirms the current-date @ variable documentation does not reflect the behavior of UniVerse 11.3.1.6022. All values relate to the established @DATE value. Disabling automatic date and time, set the clock to late New Year's eve, run the program, celebrate the new year, and let the program finish.
AtDay
0001 program AtDay
0002
0003 D = DATE()
0004 print "DATE(): ":DATE():", ": OCONV(D,"D4/")
0005 print "@MONTH: ":@MONTH
0006 print "@DAY: ":@DAY
0007 print "@YEAR: ":@YEAR
0008 print "@YEAR4: ":@YEAR4
0009 print "Wait for end of day: ":
0010 input Junk
0011
0012 D = DATE()
0013 print "DATE(): ":DATE():", ": OCONV(D,"D4/")
0014 print "@MONTH: ":@MONTH
0015 print "@DAY: ":@DAY
0016 print "@YEAR: ":@YEAR
0017 print "@YEAR4: ":@YEAR4
At the input prompt, let the date roll over to the next year.
>run bp AtDay
DATE(): 20086, 12/28/2022
@MONTH: 12
@DAY: 28
@YEAR: 22
@YEAR4: 2022
Wait for end of day: ?
DATE(): 20090, 01/01/2023
@MONTH: 12
@DAY: 28
@YEAR: 22
@YEAR4: 2022
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
------------------------------