| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sfldate.h" int week_of_year (long date)
Returns the week of the year, where 1 is the first full week. Week 0 may or may not exist in any year. Uses a Lillian date algorithm to calculate the week of the year.
{ long year = GET_CCYEAR (date) - 1501, day = year * 365 + year / 4 - 29872L + 1 - year / 100 + (year - 300) / 400; return ((julian date (date) + (int) ((day + 4) % 7)) / 7); }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |