DP(8)

πŸ“¦
version 1.8 Β· 6 versions
, in alpine 3.24, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0

✨ DP(8) ✨

okay bestie, gather round, because we're talking about dp from the nmh squad β€” she's the parser of RFC 822-style dates and she's lowkey the most underrated little tool in the whole System Manager's Manual lineup. this is section 8, system manager territory, so you know she means business πŸ’…


🌸 SYNOPSIS 🌸

/usr/libexec/nmh/dp [-help] [-version] [-form formatfile] [-format
     string] [-width columns] dates ...

like, she lives at /usr/libexec/nmh/dp and you just hand her some dates ... and she does her thing. there's -help, there's -version, there's -form formatfile, -format string, and -width columns β€” a whole lil glow-up kit fr fr ✨


πŸ’– DESCRIPTION πŸ’–

so dp is a program that parses dates according to the ARPA Internet standard. periodt. but here's the tea β€” she's not rigid about it, because she also understands many non-standard formats, like the ones produced by TOPS-20 sites and some Unix sites using ctime(3). she's flexible, she's forgiving, she's giving main character energy πŸ¦‹

and why do you care? because she's useful for seeing how nmh will interpret a date. that's literally her whole vibe check. you feed her a date, she tells you what nmh thinks it means. no cap.

the way she works: dp treats each argument as a single date, and prints the date out in the official RFC 822 format. so heads up bestie β€” it's usually best to enclose each argument in quotes for the shell, otherwise your shell is gonna eat it before dp ever gets a bite 😭

wanna override the output format? iconic, go off. you use the -format string or -format file switches. this lets you extract individual fields of the address with ease β€” the string is simply a format string and the file is simply a format file. all the deets live in mh-format(5), so go read that if you want the full lore πŸŽ€

here's the default format string dp uses:

%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>

and what is she even saying with that? okay so: if an error was detected, print the error, a :, and the date in error. Otherwise, output the RFC 822-proper format of the date. she's got range, she's got structure, she ate πŸ’…


πŸŽ€ FILES πŸŽ€

  • $HOME/.mh_profile β€” The user's profile.

🧚 PROFILE COMPONENTS 🧚

None

like... nothing. empty. she's self-sufficient, she doesn't need your profile to slay πŸ™ˆ


🌈 SEE ALSO 🌈

also, and this is important: Standard for the Format of ARPA Internet Text Messages (RFC 822) β€” that's the source material, the blueprint, the origin story ⭐


⭐ DEFAULTS ⭐

  • -format β€” As described above. (iykyk, scroll back up bestie)
  • -width β€” The width of the terminal.

πŸ’œ CONTEXT πŸ’œ

None

yeah. no context. she said "I don't need the drama" and honestly? respect 😌


🌸 quick reminder from your girl: keep every argument quoted for the shell, and if you're confused about formats, mh-format(5) is right there. no guessing, just vibes and documentation.

and that's the whole page, bestie β€” this was nmh-1.8, dated 1999-04-30, living under the System Manager's Manual umbrella. she's been iconic since the 90s and she's still parsing dates like it's nothing πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from