gbranden pushed a commit to branch master
in repository groff.

commit 2ee613cfb939cd09f732266617bb05f3846e8923
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Sep 21 22:59:39 2024 -0500

    mdate.pl: Report dates in ISO 8601 format.
    
    * mdate.pl: Report dates in ISO 8601 format (for man page center
      footers).  That is what we prescribe in groff_man_style(7), so it's
      only fair that we dog food our own recommendation.
---
 ChangeLog |  6 ++++++
 mdate.pl  | 24 +++++++++++++++---------
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 506645372..14b19019a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-21  G. Branden Robinson <[email protected]>
+
+       * mdate.pl: Report dates in ISO 8601 format (for man page center
+       footers).  That is what we prescribe in groff_man_style(7), so
+       it's only fair that we dog food our own recommendation.
+
 2024-09-21  G. Branden Robinson <[email protected]>
 
        * Makefile.am (set-man-page-time-stamps): New maintainer-mode
diff --git a/mdate.pl b/mdate.pl
index c105479b8..fb715ddf9 100755
--- a/mdate.pl
+++ b/mdate.pl
@@ -1,23 +1,23 @@
 #!/usr/bin/env perl
 #
-# Copyright (C) 1991-2020 Free Software Foundation, Inc.
-# 
+# Copyright (C) 1991-2024 Free Software Foundation, Inc.
+#
 # This file is part of groff.
-# 
+#
 # groff is free software; you can redistribute it and/or modify it under
 # the terms of the GNU General Public License as published by the Free
 # Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Print the modification date of $1 `nicely'.
+# Print the modification date of $1 in ISO 8601 format.
 
 use warnings;
 use strict;
@@ -27,6 +27,12 @@ use POSIX qw(LC_ALL setlocale strftime);
 setlocale(LC_ALL, "C");
 
 my @mtime = gmtime($ENV{SOURCE_DATE_EPOCH} || (stat $ARGV[0])[9]);
-my $mdate = strftime("%e %B %Y", @mtime);
+my $mdate = strftime("%Y-%m-%d", @mtime);
 $mdate =~ s/^ //;
 print "$mdate\n";
+
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to