b9b4cc82bd03847a9b1f8a3ee3bc007fd807bfc7
[mmh] / man / dp.man
1 .TH DP %manext8% "March 6, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
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 .IR 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 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 .IR 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 .SH FILES
65 .fc ^ ~
66 .nf
67 .ta \w'%etcdir%/ExtraBigFileName  'u
68 ^$HOME/\&.mh\(ruprofile~^The user profile
69 .fi
70 .SH "PROFILE COMPONENTS"
71 None
72 .SH "SEE ALSO"
73 .IR ap (8),
74 .PP
75 .I "Standard for the Format of ARPA Internet Text Messages"
76 (RFC\-822)
77 .SH DEFAULTS
78 .nf
79 .RB ` \-format "' default as described above"
80 .RB ` \-width "' default to the width of the terminal"
81 .fi
82 .SH CONTEXT
83 None
84 .SH BUGS
85 The argument to the
86 .B \-format
87 switch must be interpreted as a single token by the shell that invokes
88 .BR dp .
89 Therefore, one must usually place the argument to this switch inside quotes.