Ciao a tutti,
dato un giorno, ad esempio 5/4/2006 io vorrei conoscere che giorno della settimana e' questo, quindi ho scritto:
codice:
struct tm *calendar = (struct tm*) malloc ( 1 * sizeof( struct tm) );
char *data = (char*) malloc( 50 * sizeof(char) );
calendar->tm_mday = 12;
calendar->tm_mon = 4;
calendar->tm_year = 2006;
mktime( calendar );
strftime( data, 50, "%A", calendar );
printf( "%s\n", data );
il problema e' che comunque io cambi giorno/mese/anno lui mi scrive sempre Sunday.
potreste aiutarmi?
grazie!!!