©
serviceprofessionalgmbh
This program works out the day of the week in German based on a given date. In a first step the conversion function of REXX
is used to retrieve the day of the week in English which will then be translated.
The input date is expected in the format tt.mm.jjjj or tt/mm/jjjj.
/* REXX
*/
ARG DATUM
parse var DATUM 1 TT 3 . 4 MM 5 . 7 JJJJ
DATUM = JJJJ !! MM !! TT /* change to SORTED */
DOW = date("W",DATUM,"S") /* Day of Week ENGLISH */
Tage_E = "Monday Tuesday Wednesday Thursday Friday Saturday Sunday"
Tage_D = "Montag Dienstag Mittwoch Donnerstag Freitag Samstag Sonntag"
RETURN word(Tage_D,wordpos(DOW,Tage_E))
back to Date & Time