- May
- 402
- 5
Hi Rex,
I'm playing around with the date vars and functions. I guess you'll have
to take a closer look:
As already written, it's about ISO 8601, _not_ 9601. Please correct the
help text.
Today is Sunday, 2008-09-07:
Function @idowf:
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,4]
Samstag
meaning Saturday.
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,0]
Sonntag
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,2]
Sonntag
gets it right.
Of corse @idow if off too:
[C:\Programme\JPSoft\TCMD9]echo %@idow[%_date,2]
So
[C:\Programme\JPSoft\TCMD9]echo %@idow[%_date,4]
Sa
Function @dowf:
[C:\Programme\JPSoft\TCMD9]echo %@dowf[%_date,4]
Saturday
is also off from Sunday.
Function @dowi:
[C:\Programme\JPSoft\TCMD9]echo %@dowi[%_date,0]
1
[C:\Programme\JPSoft\TCMD9]echo %@dowi[%_date,4]
7
4 gets it right. My guess is that 2 should deliver 7, as in most
European countries Sunday is the last day of the week.
Function @day:
[C:\Programme\JPSoft\TCMD9]echo %@day[%_date,2]
7
[C:\Programme\JPSoft\TCMD9]echo %@day[%_date,4]
8
Now that is interesting. Today if still Sept. 07.
Function @month:
[C:\Programme\JPSoft\TCMD9]echo %@month[%_date,4]
9
Shouldn't this return a 2-digit minth with a leading zero?
Function @year:
[C:\Programme\JPSoft\TCMD9]echo %@year[%_date,2]
08
[C:\Programme\JPSoft\TCMD9]echo %@year[%_date,4]
07
Off by on year. ISO format should always be 4 digits.
* Klaus Meinhard *
4DOS Info - Info for DOS
www.4dos.info
I'm playing around with the date vars and functions. I guess you'll have
to take a closer look:
As already written, it's about ISO 8601, _not_ 9601. Please correct the
help text.
Today is Sunday, 2008-09-07:
Function @idowf:
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,4]
Samstag
meaning Saturday.
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,0]
Sonntag
[C:\Programme\JPSoft\TCMD9]echo %@idowf[%_date,2]
Sonntag
gets it right.
Of corse @idow if off too:
[C:\Programme\JPSoft\TCMD9]echo %@idow[%_date,2]
So
[C:\Programme\JPSoft\TCMD9]echo %@idow[%_date,4]
Sa
Function @dowf:
[C:\Programme\JPSoft\TCMD9]echo %@dowf[%_date,4]
Saturday
is also off from Sunday.
Function @dowi:
[C:\Programme\JPSoft\TCMD9]echo %@dowi[%_date,0]
1
[C:\Programme\JPSoft\TCMD9]echo %@dowi[%_date,4]
7
4 gets it right. My guess is that 2 should deliver 7, as in most
European countries Sunday is the last day of the week.
Function @day:
[C:\Programme\JPSoft\TCMD9]echo %@day[%_date,2]
7
[C:\Programme\JPSoft\TCMD9]echo %@day[%_date,4]
8
Now that is interesting. Today if still Sept. 07.
Function @month:
[C:\Programme\JPSoft\TCMD9]echo %@month[%_date,4]
9
Shouldn't this return a 2-digit minth with a leading zero?
Function @year:
[C:\Programme\JPSoft\TCMD9]echo %@year[%_date,2]
08
[C:\Programme\JPSoft\TCMD9]echo %@year[%_date,4]
07
Off by on year. ISO format should always be 4 digits.
* Klaus Meinhard *
4DOS Info - Info for DOS
www.4dos.info