DP(8mh)
π DP β the nmh date whisperer (section 8mh, bestie)
okay so real talk: dp is the nmh parser for RFC 822-style dates, and honestly? she eats. every single time. π
β¨ NAME β¨
dp β nmh parser of RFC 822-style dates ποΈπ
πΈ SYNOPSIS πΈ
/usr/lib/mh/dp [-help] [-version] [-form formatfile] [-format string]
[-width columns] dates ...
π¦ DESCRIPTION π¦
so dp is a program that parses dates according to the ARPA Internet standard. no cap. and the way she's also fluent in a whole bunch of non-standard formats?? such as the ones produced by TOPS-20 sites and some Unix sites using ctime(3). multilingual queen. π
she's genuinely useful for seeing how nmh will interpret a date β like a vibe check but for timestamps. πβ¨
here's the thing: dp treats each argument as a single date, and prints the date back out in the official RFC 822 format. which means it's usually best to enclose each argument in quotes for the shell. protect her from the shell's nonsense, fr fr. π«Ά
π OPTIONS π
now, to override the output format used by dp, you reach for the -format string or -format file switches. this lets you extract individual fields of the address with ease β yes bestie, individual fields, it's giving surgical precision. βοΈβ¨
-helpβ shows you the help, iconic behaviour-versionβ spills the version tea-formformatfile β the file is simply a format file-formatstring β the string is simply a format string-widthcolumns β sets the width, in columns
see mh-format(5) for the details, iykyk π
π the default format string π
here's the default format string dp ships with, verbatim, do not touch her:
%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
and what she's saying is: if an error was detected, print the error, a :, and the date in error. otherwise? output the RFC 822-proper format of the date. slay. π
β¨
π FILES π
$HOME/.mh_profileβ the user's profile π
π PROFILE COMPONENTS π
None
(nothing. empty. void. she needs no profile components to be her.) π
π SEE ALSO π
fmttest(1)ap(8)- Standard for the Format of ARPA Internet Text Messages (RFC 822)
β DEFAULTS β
-formatβ as described above.-widthβ the width of the terminal.
π§ CONTEXT π§
None
and that's the whole page, bestie!! this lil icon is from nmh-1.8, dated 1999-04-30 β an absolute vintage queen serving looks since the last millennium. ππ«Ά go parse some dates, you got this. β¨π
π¦ where this page comes from
- debian trixie: nmh 1.8-3
- ubuntu noble: nmh 1.8-1build4
- ubuntu questing: nmh 1.8-3
- ubuntu resolute: nmh 1.8-4
- ubuntu stonking: nmh 1.8-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms