Getting current julian date

Hi People,

Does anyone know how i go about getting the current julian date? or is it just one of those things i have to calculate myself.

Thanks.

N.

Macbook Pro, Mac OS X (10.5.5)

Posted on Oct 24, 2008 2:40 AM

Reply
4 replies

Oct 24, 2008 3:57 AM in response to SexyAndOhSoWitty

Yeah i've looked at that unfortunatly the only calendars which appear to have support are:

NSGregorianCalendar
NSBuddhistCalendar
NSChineseCalendar
NSHebrewCalendar
NSIslamicCalendar
NSIslamicCivilCalendar
NSJapaneseCalendar

which are locale based. I could work it out from a unixtime value but i'm sure that would introduce some rounding errors. Would just think that it would be included.

Message was edited by: Apple Munky

Oct 25, 2008 4:13 PM in response to Apple Munky

I guess actually thinking about it, the calculation isn't that tricky 🙂 Always looking for the complicated solution when the simple on is right in front of you 🙂

To calculate the current julian date: (unixtime/86400)+2440587.5

Which is convert the unixtime to days and then add the number of (julian)days which have elapsed between 4713 BC January 1 (when the julian calendar began) and Jan 1st 1970 (when unixtime began)

Simple when you work it out.

N.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Getting current julian date

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.