]> diplodocus.org Git - nmh/blob - man/dp.man
getpass.c: Move interface to own file.
[nmh] / man / dp.man
1 .TH DP %manext8% 1999-04-30 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 dp \- nmh parser of RFC 822-style dates
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 fmttest (1),
72 .IR ap (8)
73 .PP
74 .I "Standard for the Format of ARPA Internet Text Messages"
75 (RFC 822)
76 .SH DEFAULTS
77 .PD 0
78 .TP 20
79 \-format
80 As described above.
81 .TP
82 \-width
83 The width of the terminal.
84 .PD
85 .SH CONTEXT
86 None