Differences From Artifact [11883eeeee]:
- File src/OFDate.m — part of check-in [f5c8495a33] at 2011-10-28 22:03:50 on branch trunk — Fix leap year calculation. (user: js, size: 12487) [annotate] [blame] [check-ins using]
To Artifact [7dd968f934]:
- File
src/OFDate.m
— part of check-in
[5d102d382e]
at
2011-11-02 11:20:00
on branch trunk
— Fix parsing of struct tm.
Only add an extra day for the current year if it is a leap year and it
is at least March. (user: js, size: 12644) [annotate] [blame] [check-ins using]
︙ | |||
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | + - | @throw [OFOutOfRangeException exceptionWithClass: isa]; \ \ return tm->field; # endif #endif static int month_to_day_of_year[12] = { 0, 31, 31 + 28, 31 + 28 + 31, 31 + 28 + 31 + 30, 31 + 28 + 31 + 30 + 31, 31 + 28 + 31 + 30 + 31 + 30, 31 + 28 + 31 + 30 + 31 + 30 + 31, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, |
︙ | |||
252 253 254 255 256 257 258 | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - - - - - + + + + + + + + + + - + | #ifdef STRUCT_TM_HAS_TM_GMTOFF if (tm.tm_gmtoff != 0) @throw [OFInvalidFormatException exceptionWithClass: isa]; #endif /* Years */ |
︙ |