DP(8mh)

πŸ“¦
version 1.8 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… 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
  • -form formatfile β€” the file is simply a format file
  • -format string β€” the string is simply a format string
  • -width columns β€” 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 πŸ‘€


⭐ 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