v5:datetime:datetime_index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:datetime:index [2016/01/13 02:51] – ↷ Page name changed from v5:datetime:datetime_library to v5:datetime:index mnewnham | v5:datetime:datetime_index [2023/05/18 18:49] (current) – Deprecated dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ADOdb Date/Time Libaray ====== | + | < |
- | < | + | [[v5:datetime:Index]]\\ |
- | * Support for Daylight Savings Time may not be completely implemented | + | |
- | * There may be conflicting functionality with the [[http:// | + | |
</ | </ | ||
+ | |||
+ | ====== ADOdb Date/Time Library ====== | ||
+ | <wrap /> | ||
+ | <WRAP important> | ||
+ | [[datetime_index# | ||
+ | Use 64-bit native PHP functions instead. | ||
+ | </ | ||
+ | |||
===== Introduction ===== | ===== Introduction ===== | ||
- | PHP native date functions use integer timestamps for computations. Because of this, dates are restricted to the years 1901-2038 on Unix and 1970-2038 on Windows due to integer overflow for dates beyond those years. This library overcomes these limitations by replacing the native function' | ||
- | point numbers (normally 64-bits). | ||
- | Dates from 100 A.D. to 3000 A.D. and later have been tested. The minimum is 100 A.D. as <100 will invoke the | + | PHP native date functions use integer timestamps for computations. Because of this, on 32-bit systems dates are restricted to the years 1901-2038 on Unix and 1970-2038 on Windows due to integer overflow for dates beyond those years. |
- | 2 => 4 digit year conversion. The maximum is billions of years in the future, but this is a theoretical limit as the computation of that year would take too long with the current implementation of adodb_mktime(). | + | |
+ | This library overcomes these limitations by replacing the native function' | ||
+ | |||
+ | Dates from 100 A.D. to 3000 A.D. and later have been tested. The minimum is 100 A.D. as <100 will invoke the 2 => 4 digit year conversion. The maximum is billions of years in the future, but this is a theoretical limit as the computation of that year would take too long with the current implementation of adodb_mktime(). | ||
+ | |||
+ | ==== Deprecated ==== | ||
+ | |||
+ | The [[adodb_strftime|adodb_strftime()]] and [[adodb_gmstrftime|adodb_gmstrftime()]] functions rely on // | ||
+ | PHP 8.1]]. | ||
+ | |||
+ | Considering the code's obsolescence in the age of 64-bit computing which allows integer timestamps 292 billion years in the future as well as the complexity of replacing the deprecated functions, it was [[https:// | ||
+ | |||
+ | There is an [[https:// | ||
===== Functions Replaced ===== | ===== Functions Replaced ===== | ||
- | This library replaces native functions as follows: | ||
- | getdate() | + | This library replaces PHP native functions as follows: |
- | date() | + | |
- | gmdate() | + | ^ PHP function ^ ADOdb replacement |
- | mktime() | + | | getdate() |
- | gmmktime() | + | | date() |
- | strftime() | + | | gmdate() |
- | strftime() with | + | | mktime() |
+ | | gmmktime() | ||
+ | | strftime() | ||
+ | | gmstrftime( | ||
The parameters are identical, except that '' | The parameters are identical, except that '' | ||
not handled currently. | not handled currently. | ||
- | This library is independant | + | This library is independent |
+ | |||
+ | <WRAP info> | ||
+ | * Support for Daylight Savings is not completely implemented ([[# | ||
+ | * There may be conflicting functionality with the [[https:// | ||
+ | </ | ||
===== Performance ===== | ===== Performance ===== | ||
Line 44: | Line 69: | ||
*/ | */ | ||
</ | </ | ||
+ | ===== Daylight Savings Time ===== | ||
+ | ADOdb date/time library does not support daylight savings time but you can write [[v5: | ||
+ | ===== Future Date Cutoff ===== | ||
+ | For security reasons, the maximum future date that can be generated is defaulted to 200 years in the future. This is controlled by the constant '' | ||
===== Function Descriptions ====== | ===== Function Descriptions ====== | ||
- | ^ Function | + | ^ Function |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
- | | [[v5: | + | | [[v5: |
+ | | [[v5: | ||
v5/datetime/datetime_index.txt · Last modified: 2023/05/18 18:49 by dregad