mirror of https://github.com/nirenjan/dotfiles.git
				
				
				
			
		
			
				
	
	
		
			15 lines
		
	
	
		
			278 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
			
		
		
	
	
			15 lines
		
	
	
		
			278 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
#!/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
 | 
						|
 |