#include <tm.h>
List of all members.
Detailed Description
Definition at line 69 of file tm.h.
Member Function Documentation
Definition at line 327 of file tm.cpp.
{
int julian = -1;
long x, z, m, d, y;
long daysPer400Years = 146097L;
long fudgedDaysPer4000Years = 1460970L + 31;
if (julian < 0){
julian = (jdn <= LastJulianDateN);}
x = jdn + 68569L;
if (julian){
x+=38;
daysPer400Years = 146100L;
fudgedDaysPer4000Years = 1461000L + 1;
}
z = 4 * x / daysPer400Years;
x = x - (daysPer400Years * z + 3) / 4;
y = 4000 * (x + 1) / fudgedDaysPer4000Years;
x = x - 1461 * y / 4 + 31;
m = 80 * x / 2447;
d = x - 2447 * m / 80;
x = m / 11;
m = m + 2 - 12 * x;
y = 100 * (z - 49) + y + x;
yy = (int)y;
mm = (int)m;
dd = (int)d;
if (yy <= 0){
(yy)--;}
}
Definition at line 303 of file tm.cpp.
{
IAssert(y != 0);
int julian = -1;
long jdn;
if (julian < 0){
julian = (((y * 100L) + m) * 100 + d <= LastJulianDate);}
if (y < 0){
y++;}
if (julian){
jdn = 367L * y - 7 * (y + 5001L + (m - 9) / 7) / 4
+ 275 * m / 9 + d + 1729777L;
} else {
jdn = (long)(d - 32076)
+ 1461L * (y + 4800L + (m - 14) / 12) / 4
+ 367 * (m - 2 - (m - 14) / 12 * 12) / 12
- 3 * ((y + 4900L + (m - 14) / 12) / 100) / 4
+ 1;
}
return (int) jdn;
}
Member Data Documentation
Definition at line 71 of file tm.h.
Definition at line 72 of file tm.h.
The documentation for this class was generated from the following files: