Tidy up calc functions
This commit is contained in:
parent
582b960e0b
commit
ff268cded0
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue