| @@ 278-287 (lines=10) @@ | ||
| 275 | * |
|
| 276 | * @return Date |
|
| 277 | */ |
|
| 278 | public static function maxValue() |
|
| 279 | { |
|
| 280 | if (PHP_INT_SIZE === 4) { |
|
| 281 | // 32 bit (and additionally Windows 64 bit) |
|
| 282 | return static::createFromTimestamp(PHP_INT_MAX); |
|
| 283 | } |
|
| 284 | ||
| 285 | // 64 bit |
|
| 286 | return static::create(9999, 12, 31, 23, 59, 59); |
|
| 287 | } |
|
| 288 | ||
| 289 | /** |
|
| 290 | * Create a Date instance for the lowest supported date. |
|
| @@ 294-303 (lines=10) @@ | ||
| 291 | * |
|
| 292 | * @return Date |
|
| 293 | */ |
|
| 294 | public static function minValue() |
|
| 295 | { |
|
| 296 | if (PHP_INT_SIZE === 4) { |
|
| 297 | // 32 bit (and additionally Windows 64 bit) |
|
| 298 | return static::createFromTimestamp(~PHP_INT_MAX); |
|
| 299 | } |
|
| 300 | ||
| 301 | // 64 bit |
|
| 302 | return static::create(1, 1, 1, 0, 0, 0); |
|
| 303 | } |
|
| 304 | ||
| 305 | /** |
|
| 306 | * Create a new Date instance from a specific date and time. |
|