Code
import calendar
def JulianDate_to_MMDDYYY(y,jd):
month = 1
day = 0
while jd - calendar.monthrange(y,month)[1] > 0 and month <= 12:
jd = jd - calendar.monthrange(y,month)[1]
month = month + 1
print month,jd,y
JulianDate_to_MMDDYYY(2008,167)
Result:
6 15 2008
Check Code:
from datetime import date
d0 = date(2008, 1, 1)
d1 = date(2008, 6, 15)
delta = d1 - d0
print delta.days+1
Result:
167
Recherches associées
Liens | Site |
---|---|
Julian Day Calendar | landweb |
Calendar date | wikipedia |
Extract day of year and Julian day from a string date in python | stackoverflow |
Convert julian day into date | stackoverflow |
Days between two dates in Python | stackoverflow |
How do I calculate number of days betwen two dates using Python? | stackoverflow |