#include "wlcstdlib.h"
#include <time.h>
Data Structures | |
struct | dms |
struct | tms |
Functions | |
void | dmscpy (struct dms *dst, const struct dms *src) |
dms * | atodms (const char *isodate) |
char * | print_dms (char *str, const struct dms *date) |
int | dms_greater (const struct dms *date1, const struct dms *date2) |
int | dms_less (const struct dms *date1, const struct dms *date0) |
int | dms_equal (const struct dms *date1, const struct dms *date0) |
int | inc_dms (struct dms *date) |
int | days_in_month (int year, int month) |
void | tmscpy (struct tms *dst, const struct tms *src) |
tms * | atotms (const char *isotime) |
void | atotms2 (const char *isotime, struct tms *stime) |
void | tm_to_stm (struct tms *dst, const struct tm *src) |
tms * | difftms (const struct tms *time1, const struct tms *time0) |
int | tms_greater (const struct tms *time1, const struct tms *time0) |
int | tms_less (const struct tms *time1, const struct tms *time0) |
int | tms_equal (const struct tms *time1, const struct tms *time0) |
int | tms_to_sec (const struct tms *time) |
char * | print_tms (char *str, const struct tms *time) |
struct dms* atodms | ( | const char * | isodate | ) |
Allocate a dms structure with date from string isodate.
isodate | a string with a date in the ISO format |
struct tms* atotms | ( | const char * | isotime | ) |
Allocates a tms structure with the time form string isotime.
isotime | string with time in format HH:MM:SS |
void atotms2 | ( | const char * | isotime, | |
struct tms * | stime | |||
) |
Copys the time from string isotime do stime.
isotime | source time in format HH:MM:SS | |
stime | destination |
int days_in_month | ( | int | year, | |
int | month | |||
) |
Checks is date1 > date2
Checks is date1 > date2
Checks is date1 > date2
int inc_dms | ( | struct dms * | date | ) |
Increments date date.
char* print_dms | ( | char * | str, | |
const struct dms * | date | |||
) |
Prints the date from date to string str.
str | date from date in ISO format | |
date | source date |
char* print_tms | ( | char * | str, | |
const struct tms * | time | |||
) |
Prints time from time to string str.
str | destination string | |
time | source time to be printed |
void tm_to_stm | ( | struct tms * | dst, | |
const struct tm * | src | |||
) |
Copys time from tm structure src to tms structure dst
Checks is time1 > time2
Checks is time1 > time2
Checks is time1 > time2
int tms_to_sec | ( | const struct tms * | time | ) |