Module Name: src Committed By: uwe Date: Tue May 10 09:07:57 UTC 2022
Modified Files: src/bin/date: date.1 Log Message: date(1): Use .Dl for one-liners. Same output is generated. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/bin/date/date.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/date/date.1 diff -u src/bin/date/date.1:1.49 src/bin/date/date.1:1.50 --- src/bin/date/date.1:1.49 Tue May 10 09:00:39 2022 +++ src/bin/date/date.1 Tue May 10 09:07:57 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: date.1,v 1.49 2022/05/10 09:00:39 uwe Exp $ +.\" $NetBSD: date.1,v 1.50 2022/05/10 09:07:57 uwe Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -112,9 +112,8 @@ manual page, as well as any arbitrary te A <newline> character is always output after the characters specified by the format string. The format string for the default display is: -.Bd -literal -offset indent -%a %b %e %H:%M:%S %Z %Y -.Ed +.Pp +.Dl %a %b %e %H:%M:%S %Z %Y .Pp If an operand does not have a leading plus sign, it is interpreted as a value for setting the system's notion of the current date and time. @@ -189,9 +188,8 @@ is absent, UTC leap seconds are loaded f .Pa /usr/share/zoneinfo/posixrules . .Sh EXAMPLES The command: -.Bd -literal -offset indent -date '+DATE: %m/%d/%y%nTIME: %H:%M:%S' -.Ed +.Pp +.Dl date '+DATE: %m/%d/%y%nTIME: %H:%M:%S' .Pp will display: .Bd -literal -offset indent @@ -200,26 +198,23 @@ TIME: 13:36:16 .Ed .Pp The command: -.Bd -literal -offset indent -date 8506131627 -.Ed +.Pp +.Dl date 8506131627 .Pp sets the date to .Dq Li "June 13, 1985, 4:27 PM" . .Pp The command: -.Bd -literal -offset indent -date 1432 -.Ed +.Pp +.Dl date 1432 .Pp sets the time to .Li "2:32 PM" , without modifying the date. .Pp The command: -.Bd -literal -offset indent -date +%s -.Ed +.Pp +.Dl date +%s .Pp prints the current time as seconds since the Epoch. .Sh DIAGNOSTICS