|
hi,all
Is there a function like get_day_of_week(), the input is a string like this:
"01-Aug-2005" and the return is the Number 1 to 7 stand for the Monday to Sunday, for example,
[code:1]
int rc;
rc = get_day_of_week("01-Aug-2005");
switch rc
case 1: printf("Monday!");break;
....
case 7: printf("Sunday!);break;
[/code:1]
And the input date is not the current day,may be a day some years ago.
Now I want to konw is there a function in UNIX C, if not ,how can I write this function,,how can I convert the string to be a date !
any suggest will be helpful! thx![code:1][/code:1] |
|