1 | .\" |
---|
2 | .\" %nmhwarning% |
---|
3 | .\" $Id: dp.man,v 1.1.1.1 1999-02-07 18:14:19 danw Exp $ |
---|
4 | .\" |
---|
5 | .\" include the -mh macro file |
---|
6 | .so %etcdir%/tmac.h |
---|
7 | .\" |
---|
8 | .TH DP %manext8% MH.6.8 [%nmhversion%] |
---|
9 | .SH NAME |
---|
10 | dp \- parse dates 822-style |
---|
11 | .SH SYNOPSIS |
---|
12 | .in +.5i |
---|
13 | .ti -.5i |
---|
14 | %libdir%/dp |
---|
15 | \%[\-form\ formatfile] |
---|
16 | .br |
---|
17 | \%[\-format\ string] |
---|
18 | \%[\-width\ columns] |
---|
19 | dates\ ... |
---|
20 | .br |
---|
21 | \%[\-version] |
---|
22 | \%[\-help] |
---|
23 | .in -.5i |
---|
24 | .SH DESCRIPTION |
---|
25 | \fIDp\fR is a program that parses dates according to the ARPA Internet |
---|
26 | standard. |
---|
27 | It also understands many non\-standard formats, |
---|
28 | such as those produced by TOPS\-20 sites and some UNIX sites using |
---|
29 | \fIctime\fR(3). |
---|
30 | It is useful for seeing how \fInmh\fR will interpret a date. |
---|
31 | |
---|
32 | The \fIdp\fR program treats each argument as a single date, |
---|
33 | and prints the date out in the official 822\-format. |
---|
34 | Hence, it is usually best to enclose each argument in double\-quotes for the |
---|
35 | shell. |
---|
36 | |
---|
37 | To override the output format used by \fIdp\fR, |
---|
38 | the `\-format\ string' or `\-format\ file' switches are used. |
---|
39 | This permits individual fields of the address to be extracted with ease. |
---|
40 | The string is simply a format string and the file is simply a format file. |
---|
41 | See \fImh\-format\fR(5) for the details. |
---|
42 | |
---|
43 | Here is the default format string used by \fIdp\fR: |
---|
44 | |
---|
45 | .nf |
---|
46 | .ti +.5i |
---|
47 | %<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%> |
---|
48 | .fi |
---|
49 | |
---|
50 | which says that if an error was detected, print the error, a `:', |
---|
51 | and the date in error. |
---|
52 | Otherwise, output the 822\-proper format of the date. |
---|
53 | .Fi |
---|
54 | ^$HOME/\&.mh\(ruprofile~^The user profile |
---|
55 | .Pr |
---|
56 | None |
---|
57 | .Sa |
---|
58 | ap(8) |
---|
59 | .br |
---|
60 | \fIStandard for the Format of ARPA Internet Text Messages\fR (RFC\-822) |
---|
61 | .De |
---|
62 | `\-format' default as described above |
---|
63 | .Ds |
---|
64 | `\-width' default to the width of the terminal |
---|
65 | .Co |
---|
66 | None |
---|
67 | .Bu |
---|
68 | The argument to the `\-format' switch must be interpreted as a single token |
---|
69 | by the shell that invokes \fIdp\fR. |
---|
70 | Therefore, |
---|
71 | one must usually place the argument to this switch inside double\-quotes. |
---|
72 | .En |
---|