head	1.2;
access;
symbols
	RELENG_8_4:1.1.1.1.0.58
	RELENG_9_1_0_RELEASE:1.1.1.1
	RELENG_9_1:1.1.1.1.0.56
	RELENG_9_1_BP:1.1.1.1
	RELENG_8_3_0_RELEASE:1.1.1.1
	RELENG_8_3:1.1.1.1.0.54
	RELENG_8_3_BP:1.1.1.1
	RELENG_9_0_0_RELEASE:1.1.1.1
	RELENG_9_0:1.1.1.1.0.52
	RELENG_9_0_BP:1.1.1.1
	RELENG_9:1.1.1.1.0.50
	RELENG_9_BP:1.1.1.1
	RELENG_7_4_0_RELEASE:1.1.1.1
	RELENG_8_2_0_RELEASE:1.1.1.1
	RELENG_7_4:1.1.1.1.0.48
	RELENG_7_4_BP:1.1.1.1
	RELENG_8_2:1.1.1.1.0.46
	RELENG_8_2_BP:1.1.1.1
	RELENG_8_1_0_RELEASE:1.1.1.1
	RELENG_8_1:1.1.1.1.0.44
	RELENG_8_1_BP:1.1.1.1
	RELENG_7_3_0_RELEASE:1.1.1.1
	RELENG_7_3:1.1.1.1.0.42
	RELENG_7_3_BP:1.1.1.1
	RELENG_8_0_0_RELEASE:1.1.1.1
	RELENG_8_0:1.1.1.1.0.40
	RELENG_8_0_BP:1.1.1.1
	RELENG_8:1.1.1.1.0.38
	RELENG_8_BP:1.1.1.1
	RELENG_7_2_0_RELEASE:1.1.1.1
	RELENG_7_2:1.1.1.1.0.36
	RELENG_7_2_BP:1.1.1.1
	RELENG_7_1_0_RELEASE:1.1.1.1
	RELENG_6_4_0_RELEASE:1.1.1.1
	RELENG_7_1:1.1.1.1.0.34
	RELENG_7_1_BP:1.1.1.1
	RELENG_6_4:1.1.1.1.0.32
	RELENG_6_4_BP:1.1.1.1
	v1_11_20080310:1.1.1.1
	RELENG_7_0_0_RELEASE:1.1.1.1
	RELENG_6_3_0_RELEASE:1.1.1.1
	v1_11_22:1.1.1.1
	PRE_1_11_22:1.1.1.1
	RELENG_7_0:1.1.1.1.0.30
	RELENG_7_0_BP:1.1.1.1
	RELENG_6_3:1.1.1.1.0.28
	RELENG_6_3_BP:1.1.1.1
	RELENG_7:1.1.1.1.0.26
	RELENG_7_BP:1.1.1.1
	RELENG_6_2_0_RELEASE:1.1.1.1
	RELENG_6_2:1.1.1.1.0.24
	RELENG_6_2_BP:1.1.1.1
	RELENG_5_5_0_RELEASE:1.1.1.1
	RELENG_5_5:1.1.1.1.0.22
	RELENG_5_5_BP:1.1.1.1
	RELENG_6_1_0_RELEASE:1.1.1.1
	RELENG_6_1:1.1.1.1.0.20
	RELENG_6_1_BP:1.1.1.1
	RELENG_6_0_0_RELEASE:1.1.1.1
	RELENG_6_0:1.1.1.1.0.18
	RELENG_6_0_BP:1.1.1.1
	RELENG_6:1.1.1.1.0.16
	RELENG_6_BP:1.1.1.1
	RELENG_5_4_0_RELEASE:1.1.1.1
	RELENG_5_4:1.1.1.1.0.14
	RELENG_5_4_BP:1.1.1.1
	RELENG_4_11_0_RELEASE:1.1.1.1.2.1
	RELENG_4_11:1.1.1.1.2.1.0.8
	RELENG_4_11_BP:1.1.1.1.2.1
	RELENG_5_3_0_RELEASE:1.1.1.1
	RELENG_5_3:1.1.1.1.0.12
	RELENG_5_3_BP:1.1.1.1
	RELENG_5:1.1.1.1.0.10
	RELENG_5_BP:1.1.1.1
	v1_11_17:1.1.1.1
	RELENG_4_10_0_RELEASE:1.1.1.1.2.1
	RELENG_4_10:1.1.1.1.2.1.0.6
	RELENG_4_10_BP:1.1.1.1.2.1
	v1_11_15:1.1.1.1
	RELENG_5_2_1_RELEASE:1.1.1.1
	RELENG_5_2_0_RELEASE:1.1.1.1
	RELENG_5_2:1.1.1.1.0.8
	RELENG_5_2_BP:1.1.1.1
	RELENG_4_9_0_RELEASE:1.1.1.1.2.1
	RELENG_4_9:1.1.1.1.2.1.0.4
	RELENG_4_9_BP:1.1.1.1.2.1
	RELENG_5_1_0_RELEASE:1.1.1.1
	RELENG_5_1:1.1.1.1.0.6
	RELENG_5_1_BP:1.1.1.1
	RELENG_4_8_0_RELEASE:1.1.1.1.2.1
	RELENG_4_8:1.1.1.1.2.1.0.2
	RELENG_4_8_BP:1.1.1.1.2.1
	v1_11_5:1.1.1.1
	RELENG_5_0_0_RELEASE:1.1.1.1
	RELENG_5_0:1.1.1.1.0.4
	RELENG_5_0_BP:1.1.1.1
	v1_11_2_1_20021201:1.1.1.1
	RELENG_4:1.1.1.1.0.2
	v1_11_2:1.1.1.1
	CVSHOME:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2013.06.16.00.38.19;	author svnexp;	state dead;
branches;
next	1.1;

1.1
date	2002.09.02.05.49.36;	author peter;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2002.09.02.05.49.36;	author peter;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.58.1;
next	;

1.1.1.1.2.1
date	2002.10.15.20.24.31;	author peter;	state Exp;
branches;
next	;

1.1.1.1.58.1
date	2002.09.02.05.49.36;	author svnexp;	state dead;
branches;
next	1.1.1.1.58.2;

1.1.1.1.58.2
date	2013.03.28.13.00.40;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251794
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@@gnu.ai.mit.edu>, June 1995
#
# This program 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 2, or (at your option)
# any later version.
#
# This program 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, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME

# Get the extended ls output of the file or directory.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
if ls -L /dev/null 1>/dev/null 2>&1; then
  set - x`ls -L -l -d $1`
else
  set - x`ls -l -d $1`
fi
# The month is at least the fourth argument
# (3 shifts here, the next inside the loop).
shift
shift
shift

# Find the month.  Next argument is day, followed by the year or time.
month=
until test $month
do
  shift
  case $1 in
    Jan) month=January; nummonth=1;;
    Feb) month=February; nummonth=2;;
    Mar) month=March; nummonth=3;;
    Apr) month=April; nummonth=4;;
    May) month=May; nummonth=5;;
    Jun) month=June; nummonth=6;;
    Jul) month=July; nummonth=7;;
    Aug) month=August; nummonth=8;;
    Sep) month=September; nummonth=9;;
    Oct) month=October; nummonth=10;;
    Nov) month=November; nummonth=11;;
    Dec) month=December; nummonth=12;;
  esac
done

day=$2

# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
  *:*) set `date`; eval year=\$$#
       case $2 in
	 Jan) nummonthtod=1;;
	 Feb) nummonthtod=2;;
	 Mar) nummonthtod=3;;
	 Apr) nummonthtod=4;;
	 May) nummonthtod=5;;
	 Jun) nummonthtod=6;;
	 Jul) nummonthtod=7;;
	 Aug) nummonthtod=8;;
	 Sep) nummonthtod=9;;
	 Oct) nummonthtod=10;;
	 Nov) nummonthtod=11;;
	 Dec) nummonthtod=12;;
       esac
       # For the first six month of the year the time notation can also
       # be used for files modified in the last year.
       if (expr $nummonth \> $nummonthtod) > /dev/null;
       then
	 year=`expr $year - 1`
       fi;;
  *) year=$3;;
esac

# The result.
echo $day $month $year
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import cvs-1.11.2 onto vendor branch

Obtained from: http://www.cvshome.org/
@
text
@@


1.1.1.1.58.1
log
@file mdate-sh was added on branch RELENG_8_4 on 2013-03-28 13:00:40 +0000
@
text
@d1 92
@


1.1.1.1.58.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 92
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@@gnu.ai.mit.edu>, June 1995
#
# This program 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 2, or (at your option)
# any later version.
#
# This program 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, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME

# Get the extended ls output of the file or directory.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
if ls -L /dev/null 1>/dev/null 2>&1; then
  set - x`ls -L -l -d $1`
else
  set - x`ls -l -d $1`
fi
# The month is at least the fourth argument
# (3 shifts here, the next inside the loop).
shift
shift
shift

# Find the month.  Next argument is day, followed by the year or time.
month=
until test $month
do
  shift
  case $1 in
    Jan) month=January; nummonth=1;;
    Feb) month=February; nummonth=2;;
    Mar) month=March; nummonth=3;;
    Apr) month=April; nummonth=4;;
    May) month=May; nummonth=5;;
    Jun) month=June; nummonth=6;;
    Jul) month=July; nummonth=7;;
    Aug) month=August; nummonth=8;;
    Sep) month=September; nummonth=9;;
    Oct) month=October; nummonth=10;;
    Nov) month=November; nummonth=11;;
    Dec) month=December; nummonth=12;;
  esac
done

day=$2

# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
  *:*) set `date`; eval year=\$$#
       case $2 in
	 Jan) nummonthtod=1;;
	 Feb) nummonthtod=2;;
	 Mar) nummonthtod=3;;
	 Apr) nummonthtod=4;;
	 May) nummonthtod=5;;
	 Jun) nummonthtod=6;;
	 Jul) nummonthtod=7;;
	 Aug) nummonthtod=8;;
	 Sep) nummonthtod=9;;
	 Oct) nummonthtod=10;;
	 Nov) nummonthtod=11;;
	 Dec) nummonthtod=12;;
       esac
       # For the first six month of the year the time notation can also
       # be used for files modified in the last year.
       if (expr $nummonth \> $nummonthtod) > /dev/null;
       then
	 year=`expr $year - 1`
       fi;;
  *) year=$3;;
esac

# The result.
echo $day $month $year
@


1.1.1.1.2.1
log
@MFC: cvs-1.11.2, plus client.c rev 1.7 (missing client upload)
@
text
@@

