[iPhone] Gregorian > Julian Date
+ (float)solarToJulianCalendar:(int)Year setMonth:(int)Month setDay:(int)Day
{
float JD, a, y, m;
a = floor(((14 - Month) / 12));
y = Year + 4800 - a;
m = Month + (12 * a) - 3;
JD = Day + floor(((153 * m) + 2) / 5) + (365 * y) + floor(y / 4) - floor(y / 100) + floor(y / 400) - 32045;
return JD;
}
댓글
댓글 쓰기