#!/bin/rc rfork e out=echo post=(sed 's/(^[0-9]+)\.[0-9]+$/\1/') flagfmt='n,l' if (! ifs=() eval `{aux/getflags $*}) { echo 'usage: '$0' [-nl] [seconds]' >[1=2] exit usage } if (! ~ $flagn '') out=(echo -n) if (! ~ $flagl '') post=cat if (~ $#* 0) secs=`{date -n} if not secs=$1 # julian day for unix epoch + time since unix epoch - tjd offset from julian day. today=`{hoc -e '2440587.5 + ( '$secs' / ( 60*60*24)) - 2440000.5' | $post} $out $today