[m-dev.] diff: make create_archive y2k compliant
Peter Ross
petdr at cs.mu.OZ.AU
Tue Feb 15 14:55:32 AEDT 2000
Hi,
===================================================================
Estimated hours taken: 1
w3/mailing-lists/create_archive:
Make the script y2k compliant.
Index: create_archive
===================================================================
RCS file: /home/mercury1/repository/w3/mailing-lists/create_archive,v
retrieving revision 1.2
diff -u -r1.2 create_archive
--- create_archive 1998/11/19 06:02:42 1.2
+++ create_archive 2000/01/27 06:37:30
@@ -9,7 +9,7 @@
day=`date '+%d'`
month=`date '+%m'`
-year=`date '+%y'`
+year=`date '+%Y'`
if [ $day = "01" ]
then
@@ -20,10 +20,12 @@
./archive2html.sh -d $dir -f mercury-users -m 01 -y 97
m=02
-y=97
+y=1997
while [ $y -le $year ]
do
+ difference=`expr $year - $y`
+ two_digit_year=`date -d "$difference year ago" +%y`
while [ $m -le 12 ]
do
if [ $y -eq $year -a $m -gt $month ]
@@ -33,7 +35,7 @@
for mail in mercury-users mercury-developers
do
- ./archive2html.sh -d $dir -f $mail -m $m -y $y
+ ./archive2html.sh -d $dir -f $mail -m $m -y $two_digit_year
done
m=`expr $m + 1`
----
Peter Ross
PhD Student University of Melbourne
http://www.cs.mu.oz.au/~petdr/
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list