APL/Révisions/Structures/date.c

10 lines
256 B
C
Raw Permalink Normal View History

2022-01-25 12:00:33 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
time_t stamp = time(NULL);
struct tm* temps = localtime(&stamp);
printf("Nous sommes le : %4d-%02d-%02d\n", temps->tm_year + 1900, temps->tm_mon + 1, temps->tm_mday);
}