Be quiet! Only talk if you have something useful to say.
[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 [ \-format
14 .IR string ]
15 .RB [ \-width
16 .IR columns ]
17 .RB [ \-version ]
18 .RB [ \-help ]
19 .I dates
20 \&...
21 .ad
22 .SH DESCRIPTION
23 .B Dp
24 is a program that parses dates according to the ARPA Internet standard.
25 It also understands many non\-standard formats,
26 such as those produced by TOPS\-20 sites and some UNIX sites using
27 .BR ctime (3).
28 It is useful for seeing how
29 .B nmh
30 will interpret a date.
31 .PP
32 The
33 .B dp
34 program treats each argument as a single date,
35 and prints the date out in the official 822\-format.
36 Hence, it is usually best to enclose each argument in double\-quotes for the
37 shell.
38 .PP
39 To override the output format used by
40 .BR dp ,
41 the
42 .B \-format
43 .I string
44 or
45 .B \-format
46 .I file
47 switches are used.
48 This permits individual fields of the address to be extracted with ease.
49 The string is simply a format string and the file is simply a format file.
50 See
51 .BR mh\-format (5)
52 for the details.
53 .PP
54 Here is the default format string used by
55 .BR dp :
56 .PP
57 .RS 5
58 %<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
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 ` \-format "' 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 \-format
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.