|
|
|
|
||
|
DEFINITION MODULE WriteDatTim; (******************************************************************* Module WriteDatTim (Version 2.02) Copyright (c) 1988-2006 by Andreas Fischlin and ETH Zurich. Purpose Writing of date and time. Remarks -- Programming o Design Andreas Fischlin 16/05/1988 o Implementation Andreas Fischlin 16/05/1988 ETH Zurich Systems Ecology CHN E 35.1 Universitaetstrasse 16 8092 Zurich SWITZERLAND URLs: <mailto:RAMSES@env.ethz.ch> <http://www.sysecol.ethz.ch> <http://www.sysecol.ethz.ch/SimSoftware/RAMSES> Last revision of definition: 25/11/1990 AF *******************************************************************) CONST Jan = 1; Feb = 2; Mar = 3; Apr = 4; Mai = 5; Jun = 6; Jul = 7; Aug = 8; Sep = 9; Oct = 10; Nov = 11; Dec = 12; Sun = 1; Mon = 2; Tue = 3; Wed = 4; Thur = 5; Fri = 6; Sat = 7; TYPE Months = INTEGER; WeekDays = INTEGER; DateAndTimeRec = RECORD year: INTEGER; (* 1904,1905,...2040 *) month: Months; day, (* 1,...31 *) hour, (* 0,...,23 *) minute, (* 0,...,59 *) second: INTEGER; (* 0,...,59 *) dayOfWeek: WeekDays; (* Sun = 1, Sat = 7 *) END; WriteProc = PROCEDURE (CHAR); DateFormat = ( brief, (* only numbers: e.g. 31/05/88 *) letMonth, (* month in letters: e.g. 31/Mai/1988 *) full (* full in letters: e.g. 31st Mai 1988 *) ); TimeFormat = ( brief24h, (* 24 hour format brief: e.g. 23:15 *) brief24hSecs, (* 24 hour brief & secs: e.g. 23:15:02 *) let24hSecs, (* hour in letters: e.g. 23h 15' 02" *) full24hSecs, (* full in letters: e.g. 23 hours 15 minutes 02 seconds *) brief12h (* 24 hour format brief: e.g. 11:15 pm *) ); (* the following procedures write information in English only *) PROCEDURE WriteDate(d: DateAndTimeRec; w: WriteProc; df: DateFormat); PROCEDURE WriteTime(d: DateAndTimeRec; w: WriteProc; tf: TimeFormat); END WriteDatTim.
|
||
|
|
|