Next: , Previous: , Up: Calendar Customization   [Contents][Index]


26.5.8.4 Time Display Format

The calendar and diary by default display times of day in the conventional American style with the hours from 1 through 12, minutes, and either ‘am’ or ‘pm’. If you prefer the European style, also known in the US as military, in which the hours go from 00 to 23, you can alter the variable calendar-time-display-form. This variable is a list of expressions that can involve the variables 12-hours, 24-hours, and minutes, which are all numbers in string form, and am-pm and time-zone, which are both alphabetic strings. The default value of calendar-time-display-form is as follows:

(12-hours ":" minutes am-pm
          (if time-zone " (") time-zone (if time-zone ")"))

Here is a value that provides European style times:

(24-hours ":" minutes
          (if time-zone " (") time-zone (if time-zone ")"))

gives military-style times like ‘21:07 (UT)’ if time zone names are defined, and times like ‘21:07’ if they are not.