Lines Matching refs:nYear
86 * @param nYear the year which should be checked
93 static BOOL IsLeapYear( USHORT nYear )
95 return (BOOL)((((nYear % 4) == 0) && ((nYear % 100) != 0)) || ((nYear % 400) == 0));
103 * @param nYear the year
107 static USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
113 if ( IsLeapYear(nYear) )
131 * @param nYear the Year
135 static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
140 nDays = ((ULONG)nYear-1) * 365;
141 nDays += ((nYear-1) / 4) - ((nYear-1) / 100) + ((nYear-1) / 400);
144 nDays += DaysInMonth(i,nYear);
277 USHORT nDay,nMonth,nYear;
280 DaysToDate(nDays1,&nDay,&nMonth,&nYear);
281 nJan4=DateToDays(4,1,nYear);
388 USHORT nDay, nMonth, nYear;
394 DaysToDate(nDays,&nDay,&nMonth,&nYear);
396 *r=(double) ( IsLeapYear(nYear) );
410 USHORT nDay, nMonth, nYear;
416 DaysToDate(nDays,&nDay,&nMonth,&nYear);
417 *r=(double) ( DaysInMonth( nMonth, nYear) );
444 USHORT nDay, nMonth, nYear;
451 DaysToDate(nDays,&nDay,&nMonth,&nYear);
453 nJan1WeekDay= ( DateToDays(1,1,nYear) - 1) % 7;
459 *r= (double) ( IsLeapYear(nYear) ? 53 : 52 );
476 USHORT nDay, nMonth, nYear;
482 DaysToDate(nDays,&nDay,&nMonth,&nYear);
483 *r=(double) ( IsLeapYear(nYear) ? 366 : 365 );