﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24	Add ability to format internal variables	Lewis Rosenthal	Gregg Young	"Presently, _DATE (in the US locale) results in:


{{{
mm-dd-yy
}}}


which makes it unsuitable for such things as using it in batch scripts for creating date-based directory names, when one wants to sort them by yyyy-mm-dd.

Similarly, _DAY results in:


{{{
dd
}}}


''or''


{{{
d
}}}


(the latter when the current date is prior to the 10th of the month). This means that when padding is desired, it must be explicitly stated, as in:


{{{
%@right[2,0%_DAY%]
}}}

which can be cumbersome for the part-time scripter, such as I.

I propose adding the ability to format such strings either with INI settings or ENV vars, e.g.:


{{{
SET DATEFMT=YYYY-MM-DD
}}}


or


{{{
SET DAYFMT=DD
}}}


Use case:

What I wanted was a simple one-liner for a command line to create a target directory for rsync, as in:


{{{
X:\{hostname}\%_DATE\{volume}
}}}


so that the above would be expanded to something like:


{{{
X:\laptop\2013-12-08\DATA
}}}


To achieve that formatting with 4OS2 3.08, the code would be:


{{{
X:\{hostname}\%[_YEAR]-%@right[2,0%_MONTH]-%@right[2,0%_DAY]\{volume}
}}}


which seems a bit cumbersome."	enhancement	closed	minor	Version-3.10	Base	3.08	fixed		
