]> diplodocus.org Git - nmh/blob - etc/mhical.24hour
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / etc / mhical.24hour
1 %; mhical.24hour
2 %; Form file for mhical that directs it to use 24-hour time format.
3 %;
4 %; Default form file for mhical. The following components
5 %; are supported:
6 %; method
7 %; organizer
8 %; summary
9 %; description
10 %; location
11 %; dtstart
12 %; dtend
13 %; attendees
14 %; Each corresponds to the iCalendar property of the same name as
15 %; defined in RFC 5545, with the exception of "attendees". That is a
16 %; comma-delimited list of the common name (CN), if available, or
17 %; email address of Attendee properties.
18 %; The component names listed above are case-sensitive because
19 %; fmt_findcomp() is case-sensitive.
20 %;
21 %; Here's what it does to the %{dtstart} special component for the
22 %; event:
23 %; 1) Enable bold, and if the terminal supports color, green attributes.
24 %; 2) If the time zone is explicit, coerce the date to the local time zone;
25 %; otherwise, assume that it's a floating time.
26 %; 3) Output the date in "ddd DD MM YYYY" format.
27 %; 4) Output the time in "HH:MM" format.
28 %; 5) If the time zone is explicit, output it.
29 %; 6) Reset all terminal attributes.
30 %; The timezone is not output for the dtend component because it is
31 %; almost always (except across a daylight saving time transition)
32 %; the same as for the dtstart component.
33 %;
34 %<(nonnull{method})Method: %(putstr{method})\n%>\
35 %<(nonnull{organizer})Organizer: %(putstr{organizer})\n%>\
36 %<(nonnull{summary})Summary: %(putstr{summary})\n%>\
37 %<(nonnull{description})Description: %(putstr{description})\n%>\
38 %<(nonnull{location})Location: %(putstr{location})\n%>\
39 %<(nonnull{dtstart})At: \
40 %<(hascolor)%(zputlit(fgcolor green))%>%(zputlit(bold))\
41 %(void(szone{dtstart}))%<(gt 0)%(date2local{dtstart})%>\
42 %(day{dtstart}), %02(mday{dtstart}) %(month{dtstart}) %(year{dtstart}) \
43 %02(hour{dtstart}):%02(min{dtstart})\
44 %(void(szone{dtstart}))%<(gt 0) %(tzone{dtstart})%>\
45 %(zputlit(resetterm))\n%>\
46 %<(nonnull{dtstart})To: \
47 %(void(szone{dtend}))%<(gt 0)%(date2local{dtend})%>\
48 %(day{dtend}), %02(mday{dtend}) %(month{dtend}) %(year{dtend}) \
49 %02(hour{dtend}):%02(min{dtend})\n%>\
50 %<(nonnull{attendees})%(putstr{attendees})\n%>\