mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
af100f8156
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3539 fc73d0e0-1445-4013-8a0c-d673dee63da5
30 lines
643 B
Bash
30 lines
643 B
Bash
#!/bin/bash
|
|
CURRENTYEAR=$(date +'%Y')
|
|
CURRENTDAYOFYEAR=$(date +'%j')
|
|
|
|
while [ $CURRENTYEAR != 1998 ]
|
|
do
|
|
CURRENTYEAR=$(expr $CURRENTYEAR - 1)
|
|
|
|
if [ `expr $CURRENTYEAR % 4` -ne 0 ]
|
|
then
|
|
echo hi > /dev/null
|
|
elif [ `expr $CURRENTYEAR % 400` -eq 0 ]
|
|
then
|
|
CURRENTDAYOFYEAR=$(expr $CURRENTDAYOFYEAR + 1)
|
|
elif [ `expr $CURRENTYEAR % 100` -eq 0 ]
|
|
then
|
|
echo hi > /dev/null
|
|
else
|
|
CURRENTDAYOFYEAR=$(expr $CURRENTDAYOFYEAR + 1)
|
|
fi
|
|
|
|
if [ $CURRENTYEAR == 1998 ]
|
|
then
|
|
CURRENTDAYOFYEAR=$(expr $CURRENTDAYOFYEAR + 15)
|
|
else
|
|
CURRENTDAYOFYEAR=$(expr $CURRENTDAYOFYEAR + 365)
|
|
fi
|
|
done
|
|
|
|
echo $CURRENTDAYOFYEAR
|