Return to test-strptime.c CVS log | Up to [cvsweb.bsd.lv] / mandoc |
1.1 kristaps 1: #include <time.h> 2: 3: int 1.2 schwarze 4: main(void) 1.1 kristaps 5: { 6: struct tm tm; 1.2 schwarze 7: const char input[] = "2014-01-04"; 1.3 schwarze 8: return ! (strptime(input, "%Y-%m-%d", &tm) == input + 10 && 9: tm.tm_year == 114 && tm.tm_mon == 0 && tm.tm_mday == 4); 1.1 kristaps 10: }