bin/werclib.rc: replace fn datei and fn datet (both broken) with fn ndate (implements 9front's date -i, -m, and -t)
This commit is contained in:
parent
ed39b15eb1
commit
c3d7645c7c
1 changed files with 10 additions and 5 deletions
|
|
@ -120,10 +120,8 @@ fn get_file_title {
|
|||
}
|
||||
}
|
||||
|
||||
fn datei { datet | sed 's/T.*$//' }
|
||||
|
||||
fn datet {
|
||||
date=`{read}
|
||||
fn ndate {
|
||||
date=`{date}
|
||||
switch($date(2)){
|
||||
case Jan; mo=01
|
||||
case Feb; mo=02
|
||||
|
|
@ -352,8 +350,15 @@ fn datet {
|
|||
case YEKT; tz=+0500
|
||||
case Z; tz=+0000
|
||||
}
|
||||
switch($1){
|
||||
case -i
|
||||
echo $date(6)^-$mo-$da
|
||||
case -m
|
||||
echo $date(1)^, $da $date(2) $date(6) $date(4) $tz
|
||||
case -t
|
||||
echo $date(6)^-$mo-$da^T^$date(4)^$tz
|
||||
}
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
##########################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue