mirror of
https://github.com/e107inc/e107.git
synced 2025-08-15 02:57:15 +02:00
Renamed date class and included BC fix.
This commit is contained in:
@@ -16,7 +16,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/lan_date.php");
|
||||
|
||||
class convert
|
||||
class e_date
|
||||
{
|
||||
|
||||
function __construct()
|
||||
@@ -81,8 +81,7 @@ class convert
|
||||
/**
|
||||
* Return an array of language terms representing months
|
||||
* @param $type string : month, month-short, day, day-short, day-shortest
|
||||
* @return array
|
||||
* TODO Cache!
|
||||
* @return array|bool
|
||||
*/
|
||||
public function terms($type='month')
|
||||
{
|
||||
@@ -642,24 +641,22 @@ class convert
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This work of Lionel SAURON (http://sauron.lionel.free.fr:80) is licensed under the
|
||||
* Creative Commons Attribution-Noncommercial-Share Alike 2.0 France License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
|
||||
* or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
*
|
||||
*
|
||||
* http://snipplr.com/view/4964/emulate-php-5-for-backwards-compatibility/
|
||||
*
|
||||
*
|
||||
* Parse a date generated with strftime().
|
||||
*
|
||||
* @author Lionel SAURON and reworked by e107 Inc. for month names.
|
||||
*
|
||||
* @author Lionel SAURON and reworked by e107 Inc. for month names.
|
||||
* @version 1.0
|
||||
* @public
|
||||
*
|
||||
* @param string $str date string to parse (e.g. returned from strftime()).
|
||||
* @param string $sFormat strftime format used to create the date
|
||||
* @param $format
|
||||
* @return array|bool Returns an array with the <code>$str</code> parsed, or <code>false</code> on error.
|
||||
*/
|
||||
public function strptime($str, $format)
|
||||
@@ -919,4 +916,15 @@ class convert
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
/**
|
||||
* BC Fix convert
|
||||
*/
|
||||
class convert extends e_date
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user