3 # Copyright (C) 1991-2014 Free Software Foundation, Inc.
5 # This file is part of groff.
7 # groff is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # Print the modification date of $1 `nicely'.
22 # Don't want foreign dates.
25 LC_ALL=C; export LC_ALL
29 if ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi
32 full["Jan"] = "January"; number["Jan"] = 1;
33 full["Feb"] = "February"; number["Feb"] = 2;
34 full["Mar"] = "March"; number["Mar"] = 3;
35 full["Apr"] = "April"; number["Apr"] = 4;
36 full["May"] = "May"; number["May"] = 5;
37 full["Jun"] = "June"; number["Jun"] = 6;
38 full["Jul"] = "July"; number["Jul"] = 7;
39 full["Aug"] = "August"; number["Aug"] = 8;
40 full["Sep"] = "September"; number["Sep"] = 9;
41 full["Oct"] = "October"; number["Oct"] = 10;
42 full["Nov"] = "November"; number["Nov"] = 11;
43 full["Dec"] = "December"; number["Dec"] = 12;
53 if (number[$(NF-3)] > number[month])
58 print $(NF-2), full[$(NF-3)], year