Differences From Artifact [618922b043]:
- File
src/OFDate.m
— part of check-in
[da9b9d7e3b]
at
2017-08-05 10:04:09
on branch trunk
— OFDate: Add -[localMinute]
Some time zones have an offset that is not just full hours. (user: js, size: 13999) [annotate] [blame] [check-ins using] [more...]
To Artifact [f5a435fe1e]:
- File
src/OFDate.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 14087) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
227 228 229 230 231 232 233 | + (instancetype)distantPast { return [[[self alloc] initWithTimeIntervalSince1970: -62167219200.0] autorelease]; } | | | | | | | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | + (instancetype)distantPast { return [[[self alloc] initWithTimeIntervalSince1970: -62167219200.0] autorelease]; } - (instancetype)init { struct timeval t; self = [super init]; OF_ENSURE(gettimeofday(&t, NULL) == 0); _seconds = t.tv_sec; _seconds += (of_time_interval_t)t.tv_usec / 1000000; return self; } - (instancetype)initWithTimeIntervalSince1970: (of_time_interval_t)seconds { self = [super init]; _seconds = seconds; return self; } - (instancetype)initWithTimeIntervalSinceNow: (of_time_interval_t)seconds { self = [self init]; _seconds += seconds; return self; } - (instancetype)initWithDateString: (OFString *)string format: (OFString *)format { self = [super init]; @try { const char *UTF8String = [string UTF8String]; struct tm tm = { 0 }; int16_t tz = 0; |
︙ | ︙ | |||
284 285 286 287 288 289 290 | [self release]; @throw e; } return self; } | | | | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | [self release]; @throw e; } return self; } - (instancetype)initWithLocalDateString: (OFString *)string format: (OFString *)format { self = [super init]; @try { const char *UTF8String = [string UTF8String]; struct tm tm = { 0 }; /* |
︙ | ︙ | |||
323 324 325 326 327 328 329 | [self release]; @throw e; } return self; } | | | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | [self release]; @throw e; } return self; } - (instancetype)initWithSerialization: (OFXMLElement *)element { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); union { double d; |
︙ | ︙ | |||
385 386 387 388 389 390 391 | OF_HASH_ADD(hash, d.b[i]); OF_HASH_FINALIZE(hash); return hash; } | | | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | OF_HASH_ADD(hash, d.b[i]); OF_HASH_FINALIZE(hash); return hash; } - (id)copy { return [self retain]; } - (of_comparison_result_t)compare: (id <OFComparing>)object { OFDate *otherDate; |
︙ | ︙ |