-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathstrptime.h
47 lines (37 loc) · 1003 Bytes
/
strptime.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _STRPTIME_H
#define _STRPTIME_H
#define ALT_E 0x01
#define ALT_O 0x02
//#define LEGAL_ALT(x) { if (alt_format & ~(x)) return (0); }
#define LEGAL_ALT(x) { ; }
#define TM_YEAR_BASE (1900)
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <conio.h>
#ifdef __cplusplus
extern "C" {
#endif
char * strptime(const char *buf, const char *fmt, struct tm *tm);
#ifdef __cplusplus
}
#endif
static const char *day[7] = {
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday"
};
static const char *abday[7] = {
"Sun","Mon","Tue","Wed","Thu","Fri","Sat"
};
static const char *mon[12] = {
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
};
static const char *abmon[12] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
static const char *am_pm[2] = {
"AM", "PM"
};
#endif