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