sb-date.c (339B)
1 #include <stdio.h> 2 #include <time.h> 3 4 int main() { 5 time_t t = time(NULL); 6 struct tm tm = *localtime(&t); 7 8 const char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", 9 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; 10 11 printf("%s %02d %d\n", months[tm.tm_mon], tm.tm_mday, tm.tm_year + 1900); 12 13 return 0; 14 }