Add Julian date script based on Unix time

vimbundler
nirenjan 2013-01-21 11:15:51 -08:00
parent 0cebac58dd
commit e8f11cbf79
1 changed files with 14 additions and 0 deletions

14
scripts/jdate 100755
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
""" Calculate the Julian Date """
import time
t = time.time()
""" Technically, we should be adding 2440587.5,
however, since we are trying to stick to the stardate
concept, we add only 40587.5"""
jd = t / 86400.0 + 40587.5
print "%05.1f" % jd