d07fa6b16448d0fa16294fc51a22714f412d79e4
[mmh] / man / dp.man8
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH DP %manext8% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 dp \- parse dates 822-style
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B %libdir%/dp
11 .RB [ \-form
12 .IR formatfile ]
13 .RB [ \-width
14 .IR columns ]
15 .RB [ \-version ]
16 .RB [ \-help ]
17 .I dates
18 \&...
19 .ad
20 .SH DESCRIPTION
21 .B Dp
22 is a program that parses dates according to the ARPA Internet standard.
23 It also understands many non\-standard formats,
24 such as those produced by TOPS\-20 sites and some UNIX sites using
25 .BR ctime (3).
26 It is useful for seeing how
27 .B nmh
28 will interpret a date.
29 .PP
30 The
31 .B dp
32 program treats each argument as a single date,
33 and prints the date out in the official 822\-format.
34 Hence, it is usually best to enclose each argument in double\-quotes for the
35 shell.
36 .PP
37 To override the output format used by
38 .BR dp ,
39 the
40 .B \-form
41 .I file
42 switch is used.
43 This permits individual fields of the address to be extracted with ease.
44 The
45 .I file
46 is either the name of a format file or
47 a format string directly, if prepended with an equal sign `='.
48 See
49 .BR mh\-format (5)
50 for the details.
51 .PP
52 Here is the default format string used by
53 .BR dp :
54 .PP
55 .RS 5
56 .nf
57 %<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
58 .fi
59 .RE
60 .PP
61 which says that if an error was detected, print the error, a `:',
62 and the date in error.
63 Otherwise, output the 822\-proper format of the date.
64
65 .SH FILES
66 .fc ^ ~
67 .nf
68 .ta \w'%etcdir%/ExtraBigFileName  'u
69 ^$HOME/.mmh/profile~^The user profile
70 .fi
71
72 .SH "PROFILE COMPONENTS"
73 None
74
75 .SH "SEE ALSO"
76 ap(8),
77 .I "Standard for the Format of ARPA Internet Text Messages"
78 (RFC\-822)
79
80 .SH DEFAULTS
81 .nf
82 .RB ` \-form "' default as described above"
83 .RB ` \-width "' default to the width of the terminal"
84 .fi
85
86 .SH CONTEXT
87 None
88
89 .SH BUGS
90 The argument to the
91 .B \-form
92 switch must be interpreted as a single token by the shell that invokes
93 .BR dp .
94 Therefore, one must usually place the argument to this switch inside double\-quotes.