v5:datetime:adodb_last_date_status
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| v5:datetime:adodb_last_date_status [2019/01/02 03:31] – created mnewnham | v5:datetime:adodb_last_date_status [2023/05/18 18:53] (current) – Deprecated dregad | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| bool adodb_last_date_status() | bool adodb_last_date_status() | ||
| </ | </ | ||
| + | |||
| + | <WRAP important> | ||
| + | [[datetime_index# | ||
| + | Use 64-bit native PHP functions instead. | ||
| + | </ | ||
| + | |||
| ===== Description ===== | ===== Description ===== | ||
| Returns the status of the last time to date conversion constrained by the '' | Returns the status of the last time to date conversion constrained by the '' | ||
| Line 37: | Line 43: | ||
| [wday] => 0 | [wday] => 0 | ||
| [mon] => 11 | [mon] => 11 | ||
| - | [year] => 2218After | + | [year] => 2218 |
| [yday] => 318 | [yday] => 318 | ||
| [weekday] => Sunday | [weekday] => Sunday | ||
| Line 44: | Line 50: | ||
| ) | ) | ||
| - | This is clearly the wrong answer, because the ADODB_FUTURE_DATE_CUTOFF_YEARS has constrained the maximum forward date. Let's check the status | + | This is clearly the wrong answer, because the ADODB_FUTURE_DATE_CUTOFF_YEARS |
| + | has constrained the maximum forward date. Let's check the status | ||
| */ | */ | ||
| $status = adodb_last_date_status(); | $status = adodb_last_date_status(); | ||
| /* | /* | ||
| - | * Returns 1 (the function indicates that the last conversion failed | + | * Returns 1 (the function indicates that the last conversion failed) |
| */ | */ | ||
| + | </ | ||
| + | |||
| + | |||
| + | If we modify the constant before including the adodb includes, we can run it again | ||
| + | <code php> | ||
| + | DEFINE(' | ||
| + | include ' | ||
| + | $s = time() +(60*60*24*365 * 500); | ||
| + | /* | ||
| + | * Call the function | ||
| + | */ | ||
| + | $time = adodb_getdate($s); | ||
| + | |||
| + | print_r($time); | ||
| + | |||
| + | /* | ||
| + | Array | ||
| + | ( | ||
| + | [seconds] => 49 | ||
| + | [minutes] => 35 | ||
| + | [hours] => 2 | ||
| + | [mday] => 3 | ||
| + | [wday] => 6 | ||
| + | [mon] => 9 | ||
| + | [year] => 2518 | ||
| + | [yday] => 245 | ||
| + | [weekday] => Saturday | ||
| + | [month] => September | ||
| + | [0] => 17314396549 | ||
| + | ) | ||
| + | |||
| + | Check the status | ||
| + | */ | ||
| + | $status = adodb_last_date_status(); | ||
| + | |||
| + | /* | ||
| + | * Returns 0 (the function indicates that the last conversion succeeded) | ||
| + | */ | ||
| + | |||
| </ | </ | ||
v5/datetime/adodb_last_date_status.1546396287.txt.gz · Last modified: by mnewnham
