| iMatix home page | << | < | > | >> |
![]() Version 2.10 |
#include "sfldate.h" int julian_date (long date)
Returns the number of days since 31 December last year. The Julian date of 1 January is 1.
{ static int days [12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int julian; julian = days [GET_MONTH (date) - 1] + GET_DAY (date); if (GET_MONTH (date) > 2 && leap year (GET_YEAR (date))) julian++; return (julian); }
| << | < | > | >> |
![]() |