Differences From Artifact [42f8137e1c]:
- File
src/of_strptime.m
— part of check-in
[e4439b7ef8]
at
2016-09-11 22:03:20
on branch trunk
— OFDate: Add support for parsing time zones
This adds %z for parsing time zones. Additionally, this also adds %a and
%b. (user: js, size: 4919) [annotate] [blame] [check-ins using]
To Artifact [af4c98bb9d]:
- File src/of_strptime.m — part of check-in [99158f978b] at 2016-09-12 00:10:47 on branch trunk — of_strptime: Fix parsing of %b (user: js, size: 4918) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
110 111 112 113 114 115 116 | j += 3; break; case 'b': if (bufferLen < j + 3) return NULL; if (memcmp(buffer + j, "Jan", 3) == 0) | | | | | | | | | | | | | | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | j += 3; break; case 'b': if (bufferLen < j + 3) return NULL; if (memcmp(buffer + j, "Jan", 3) == 0) tm->tm_mon = 0; else if (memcmp(buffer + j, "Feb", 3) == 0) tm->tm_mon = 1; else if (memcmp(buffer + j, "Mar", 3) == 0) tm->tm_mon = 2; else if (memcmp(buffer + j, "Apr", 3) == 0) tm->tm_mon = 3; else if (memcmp(buffer + j, "May", 3) == 0) tm->tm_mon = 4; else if (memcmp(buffer + j, "Jun", 3) == 0) tm->tm_mon = 5; else if (memcmp(buffer + j, "Jul", 3) == 0) tm->tm_mon = 6; else if (memcmp(buffer + j, "Aug", 3) == 0) tm->tm_mon = 7; else if (memcmp(buffer + j, "Sep", 3) == 0) tm->tm_mon = 8; else if (memcmp(buffer + j, "Oct", 3) == 0) tm->tm_mon = 9; else if (memcmp(buffer + j, "Nov", 3) == 0) tm->tm_mon = 10; else if (memcmp(buffer + j, "Dec", 3) == 0) tm->tm_mon = 11; else return NULL; j += 3; break; case 'd': case 'e': |
︙ | ︙ |