Helper to deal with date
Definition at line 10 of file helper/date.class.php.
◆ __toString()
◆ afterinit()
◆ afterInit()
Call just after the configuration initialisation
Definition at line 40 of file object.class.php.
◆ beforeInit()
Call just before the configuration initialisation
Definition at line 35 of file object.class.php.
◆ format()
format |
( |
|
$type = null , |
|
|
|
$len = null |
|
) |
| |
Format the date
- Parameters
-
string | $format | Date format (date, time, or datetime) |
string | $len | Length needed (short, medium, long, full, fullMed or mysql) |
- Returns
- string The date formated
Definition at line 176 of file helper/date.class.php.
◆ formatDirect()
Format the date directly by a string format
- Parameters
-
- Returns
- string The date formated
Definition at line 204 of file helper/date.class.php.
◆ get()
Get a date element
- Parameters
-
sting | $part | Date type, could be any string used in the date PHP function |
- Returns
- string|int
Definition at line 156 of file helper/date.class.php.
◆ getArray()
◆ getAttr()
Get an attribute
- Parameters
-
string | $name | Attribute name |
- Returns
- mixed|null The attribute or null if not set
Definition at line 48 of file object.class.php.
◆ getCfg()
Get the configuration object
- Returns
- config
Definition at line 67 of file object.class.php.
◆ getJs()
Create a javascript code to create a new Date object
- Parameters
-
string | $default | Default string used in case of a non setted date |
- Returns
- string the Javascript code
Definition at line 243 of file helper/date.class.php.
◆ set()
set |
( |
|
$date, |
|
|
|
$type = 'date' , |
|
|
|
$len = null |
|
) |
| |
Set a new date or a date element
- Parameters
-
string | int | $date | The value to set |
string | $type | The value type (timestamp, date, time or a key from getArray) |
Definition at line 36 of file helper/date.class.php.
◆ setArray()
setArray |
( |
array |
$values | ) |
|
◆ setAttr()
setAttr |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
|
inherited |
Set an attribute
- Parameters
-
string | $name | Attribute name |
mixed | $value | Attribute value |
Definition at line 58 of file object.class.php.
◆ timeago()
Timeago in string to be shown
- Parameters
-
helper_date | null | $d | Date to compare to or null to use the current time |
- Returns
- string The timeago string
Definition at line 255 of file helper/date.class.php.
◆ $cfg
◆ $isNull
◆ $timestamp
The documentation for this class was generated from the following file: