Printer Version Table of Contents Project Home Page
.EXAMPLE.....: 54 Customize Fdate for a language of your choice
.CATEGORY....: examples
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.

@echo off

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=