I have a struct of values for a date.
struct date
{
int day;
int month;
int year;
};
开发者_JS百科Are there any libraries for C for quick and easy date validation.
The standard C library function mktime()
will convert year/month/day (really a full struct tm
) to a time_t
, and tell you if something went wrong.
精彩评论