diff options
Diffstat (limited to 'src/strptime.cc')
-rw-r--r-- | src/strptime.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/strptime.cc b/src/strptime.cc index b9d485d2..dc08df46 100644 --- a/src/strptime.cc +++ b/src/strptime.cc @@ -70,14 +70,14 @@ static char* _strptime(const char *s, const char *format, struct tm *tm) { case 'A': tm->tm_wday = -1; for (int i = 0; i < 7; ++i) { - len = static_cast<int>(strlen(kWeekAbbr[i])); - if (strnicmp(kWeekAbbr[i], s, len) == 0) { + len = static_cast<int>(strlen(kWeekFull[i])); + if (strnicmp(kWeekFull[i], s, len) == 0) { tm->tm_wday = i; break; } - len = static_cast<int>(strlen(kWeekFull[i])); - if (strnicmp(kWeekFull[i], s, len) == 0) { + len = static_cast<int>(strlen(kWeekAbbr[i])); + if (strnicmp(kWeekAbbr[i], s, len) == 0) { tm->tm_wday = i; break; } @@ -92,14 +92,14 @@ static char* _strptime(const char *s, const char *format, struct tm *tm) { case 'h': tm->tm_mon = -1; for (int i = 0; i < 12; ++i) { - len = static_cast<int>(strlen(kMonthAbbr[i])); - if (strnicmp(kMonthAbbr[i], s, len) == 0) { + len = static_cast<int>(strlen(kMonthFull[i])); + if (strnicmp(kMonthFull[i], s, len) == 0) { tm->tm_mon = i; break; } - len = static_cast<int>(strlen(kMonthFull[i])); - if (strnicmp(kMonthFull[i], s, len) == 0) { + len = static_cast<int>(strlen(kMonthAbbr[i])); + if (strnicmp(kMonthAbbr[i], s, len) == 0) { tm->tm_mon = i; break; } |