Tidy up calc functions

This commit is contained in:
Laurence Withers 2006-10-15 20:06:34 +01:00
parent 582b960e0b
commit ff268cded0
2 changed files with 4 additions and 0 deletions

View File

@ -340,6 +340,8 @@ int iso8601_from_week(struct iso8601_date* date, int isoyear, int week, int wday
// now simply add in the day offset and days/weeks elapsed
date->day += day1off + (week - 1) * 7 + wday - 1;
return 0;
}

View File

@ -21,7 +21,9 @@ int iso8601_isleap(int year);
void iso8601_to_cal(int* year, int* month, int* day, const struct iso8601_date* date);
int iso8601_from_cal(struct iso8601_date* date, int year, int month, int day);
void iso8601_to_ord(int* year, int* oday, const struct iso8601_date* date);
int iso8601_from_ord(struct iso8601_date* date, int year, int oday);
void iso8601_to_week(int* year, int* week, int* wday, const struct iso8601_date* date);
int iso8601_from_week(struct iso8601_date* date, int year, int week, int wday);
/* print.c */
void iso8601_print(char* str, int amt, const struct iso8601_date* date,