.EXAMPLE.....: 54 Customize Fdate for a language of your choice
.ALIAS.......: 54
.CATEGORY....: examples
.CODE........:
@echo off
cls
goto end-doc
------------------------------------------------------------------
You can use Fdate with a customized batch file to obtain the names of
the days of the week and the months in a language of your choice. Or
you could use it to obtain names in uppercase, or the first 5
characters of the names (rather than the first three), or some other
customized formatting of your choice.)
I've invented a language called Fergian, which has its own names for
the days of the week, and the months. In the following examples, I
invoke FERGIAN.BAT to make the translation. The text of FERGIAN.BAT,
which does the real work here, is given in the next example.
------------------------------------------------------------------
:end-doc
fdate /ff /omm /v
call Fergian mm- result %Fdate%
echo Month is %result%
fdate /ff /omm /v
call Fergian mm3 result %Fdate%
echo Month3 is %result%
fdate /ff /odow# /v
call Fergian dw- result %Fdate%
echo Day of week is %result%
fdate /ff /odow# /v
call Fergian dw3 result %Fdate%
echo Day of week3 is %result%
:: cleanup
set Fdate=
set result=