]> diplodocus.org Git - nmh/blob - man/dp.man
Reverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
[nmh] / man / dp.man
1 .TH DP %manext8% "November 6, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 dp \- parse dates RFC 822-style
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B %nmhlibexecdir%/dp
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RB [ \-form
14 .IR formatfile ]
15 .RB [ \-format
16 .IR string ]
17 .RB [ \-width
18 .IR columns ]
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 RFC 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 RFC 822\-proper format of the date.
64 .SH FILES
65 .TP 20
66 $HOME/.mh_profile
67 The user's profile.
68 .SH "PROFILE COMPONENTS"
69 None
70 .SH "SEE ALSO"
71 .IR ap (8),
72 .PP
73 .I "Standard for the Format of ARPA Internet Text Messages"
74 (RFC 822)
75 .SH DEFAULTS
76 .PD 0
77 .TP 20
78 \-format
79 As described above.
80 .TP
81 \-width
82 The width of the terminal.
83 .PD
84 .SH CONTEXT
85 None