This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fkbreitl
Recipients fkbreitl, gekonntde, georg.brandl, mark.dickinson, rhettinger, valhallasw
Date 2012-03-15.14:17:16
SpamBayes Score 0.0060070115
Marked as misclassified No
Message-id <1331821037.05.0.414735022148.issue829370@psf.upfronthosting.co.za>
In-reply-to
Content
Here an example where the signum function provides an elegant way to calculate the Julian date:

def julian_date(YY,MM,DD,HR,Min,Sec,UTcor):
     return 367*YY - (7*(YY+((MM+9)/12))/4) + (275*MM/9)+ DD + 1721013.5 + UTcor/24 - 0.5*sign((100*YY)+MM-190002.5) + 0.5 + HR/24.0 + Min/(60.0*24.0) + Sec/(3600.0*24.0)

http://aa.usno.navy.mil/faq/docs/JD_Formula.php
http://www.krioma.net/blog/2011/09/python_julian_date.php

By the way Julian date should be part of the time or datetime module.
History
Date User Action Args
2012-03-15 14:17:17fkbreitlsetrecipients: + fkbreitl, georg.brandl, rhettinger, mark.dickinson, gekonntde, valhallasw
2012-03-15 14:17:17fkbreitlsetmessageid: <1331821037.05.0.414735022148.issue829370@psf.upfronthosting.co.za>
2012-03-15 14:17:16fkbreitllinkissue829370 messages
2012-03-15 14:17:16fkbreitlcreate