Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/bin/rc/eow

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

# Days until the end of the world, Mayan Long Count.
# Negative numbers show days since.

if (~ $#* 0)
	secs=`{date -n}
if not
	secs=$1

# time at eow - time now
hoc -e '( 1356134400 - '$secs' ) / ( 60*60*24)'

# julian day for unix epoch + time since unix epoch - tjd offset from julian day.
#hoc -e '2440587.5 + ( '$secs' / ( 60*60*24)) - 2440000.5'

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].