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