- May
- 13,834
- 211
Below, I really wanted _DOY 0-padded to 3 digits and the rest to 2 digits. But that did absolutely nothing.
So for emphasis I tried larger numbers. And I get screwy results ... _day and _hour padded to 3 digits, _doy padded to 6 digits, and the others not padded at all (and none padded to the requested 8 or 7 digits).
Why is it so screwy?
Code:
v:\> function pad `%@format[0%@IF["%1"=="_doy",3,2],%%%1]`
v:\> do t in /L _month _day _hour _minute _second _doy ( echo %t = %@pad[%t] )
_month = 6
_day = 8
_hour = 21
_minute = 59
_second = 4
_doy = 160
So for emphasis I tried larger numbers. And I get screwy results ... _day and _hour padded to 3 digits, _doy padded to 6 digits, and the others not padded at all (and none padded to the requested 8 or 7 digits).
Code:
v:\> function pad `%@format[0%@IF["%1"=="_doy",8,7],%%%1]`
v:\> do t in /L _month _day _hour _minute _second _doy ( echo %t = %@pad[%t] )
_month = 6
_day = 008
_hour = 022
_minute = 3
_second = 2
_doy = 000160
Why is it so screwy?