Function that gets the day of the week (0-6) ??

Hi ,
I am working at Unix system,using c lang.
I need c fun which return the day of the week .
For example :
0- Sunday.
1- Monday.
....

10x.

See ctime(3).

Do you have maybe an simple example.code.

Sorry, no I don't. Look at the man page..."man ctime".

Look at struct tm
as defined in time.h
structure member tm_wday = # of days since sunday