apl/APL1.1/organisation_code/Date.c

13 lines
319 B
C
Raw Permalink Normal View History

2022-01-14 06:54:18 +01:00
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void) {
time_t timestamp = time( NULL );
struct tm * timeInfos = localtime( & timestamp );
printf( "La date est: %04d-%02d-%02d\n", timeInfos->tm_year+1900, timeInfos->tm_mon+1, timeInfos->tm_mday);
return EXIT_SUCCESS;
}