|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
A Date Format provides a format definition akin to PHP's date formatting options, but stores the single elements/options as array to ease conversion into other formats. More...
Collaboration diagram for ILIAS\Data\DateFormat\DateFormat:Public Member Functions | |
| __construct (array $format) | |
| validateFormatElelements (array $format) | |
| toArray () | |
| Get the elements of the format as array. More... | |
| toString () | |
| Get the format as string. More... | |
| __toString () | |
| applyTo (\DateTimeImmutable $datetime) | |
Data Fields | |
| const | DOT = '.' |
| const | COMMA = ',' |
| const | DASH = '-' |
| const | SLASH = '/' |
| const | SPACE = ' ' |
| const | DAY = 'd' |
| const | DAY_ORDINAL = 'jS' |
| const | WEEKDAY = 'l' |
| const | WEEKDAY_SHORT = 'D' |
| const | WEEK = 'W' |
| const | MONTH = 'm' |
| const | MONTH_SPELLED = 'F' |
| const | MONTH_SPELLED_SHORT = 'M' |
| const | YEAR = 'Y' |
| const | YEAR_TWO_DIG = 'y' |
| const | HOURS12 = 'h' |
| const | HOURS24 = 'H' |
| const | MINUTES = 'i' |
| const | SECONDS = 's' |
| const | MERIDIEM = 'a' |
| const | COLON = ':' |
| const | TOKENS |
Protected Attributes | |
| array | $format = [] |
A Date Format provides a format definition akin to PHP's date formatting options, but stores the single elements/options as array to ease conversion into other formats.
Definition at line 26 of file DateFormat.php.
| ILIAS\Data\DateFormat\DateFormat::__construct | ( | array | $format | ) |
Definition at line 77 of file DateFormat.php.
References ILIAS\Data\DateFormat\DateFormat\$format, and ILIAS\Data\DateFormat\DateFormat\validateFormatElelements().
Here is the call graph for this function:| ILIAS\Data\DateFormat\DateFormat::__toString | ( | ) |
Definition at line 109 of file DateFormat.php.
References ILIAS\Data\DateFormat\DateFormat\toString().
Here is the call graph for this function:| ILIAS\Data\DateFormat\DateFormat::applyTo | ( | \DateTimeImmutable | $datetime | ) |
Definition at line 114 of file DateFormat.php.
References $datetime, and ILIAS\Data\DateFormat\DateFormat\toString().
Here is the call graph for this function:| ILIAS\Data\DateFormat\DateFormat::toArray | ( | ) |
Get the elements of the format as array.
Definition at line 96 of file DateFormat.php.
References ILIAS\Data\DateFormat\DateFormat\$format.
| ILIAS\Data\DateFormat\DateFormat::toString | ( | ) |
Get the format as string.
Definition at line 104 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\DateFormat\__toString(), and ILIAS\Data\DateFormat\DateFormat\applyTo().
Here is the caller graph for this function:| ILIAS\Data\DateFormat\DateFormat::validateFormatElelements | ( | array | $format | ) |
Definition at line 83 of file DateFormat.php.
References ILIAS\Data\DateFormat\DateFormat\$format.
Referenced by ILIAS\Data\DateFormat\DateFormat\__construct().
Here is the caller graph for this function:
|
protected |
Definition at line 75 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\DateFormat\__construct(), ILIAS\Data\DateFormat\DateFormat\toArray(), and ILIAS\Data\DateFormat\DateFormat\validateFormatElelements().
| const ILIAS\Data\DateFormat\DateFormat::COLON = ':' |
Definition at line 48 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\colon().
| const ILIAS\Data\DateFormat\DateFormat::COMMA = ',' |
Definition at line 29 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\comma().
| const ILIAS\Data\DateFormat\DateFormat::DASH = '-' |
Definition at line 30 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\dash().
| const ILIAS\Data\DateFormat\DateFormat::DAY = 'd' |
Definition at line 33 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\day().
| const ILIAS\Data\DateFormat\DateFormat::DAY_ORDINAL = 'jS' |
Definition at line 34 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\dayOrdinal().
| const ILIAS\Data\DateFormat\DateFormat::DOT = '.' |
Definition at line 28 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\dot().
| const ILIAS\Data\DateFormat\DateFormat::HOURS12 = 'h' |
Definition at line 43 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\hours12().
| const ILIAS\Data\DateFormat\DateFormat::HOURS24 = 'H' |
Definition at line 44 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\hours24().
| const ILIAS\Data\DateFormat\DateFormat::MERIDIEM = 'a' |
Definition at line 47 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\meridiem().
| const ILIAS\Data\DateFormat\DateFormat::MINUTES = 'i' |
Definition at line 45 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\minutes().
| const ILIAS\Data\DateFormat\DateFormat::MONTH = 'm' |
Definition at line 38 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\month().
| const ILIAS\Data\DateFormat\DateFormat::MONTH_SPELLED = 'F' |
Definition at line 39 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\monthSpelled().
| const ILIAS\Data\DateFormat\DateFormat::MONTH_SPELLED_SHORT = 'M' |
Definition at line 40 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\monthSpelledShort().
| const ILIAS\Data\DateFormat\DateFormat::SECONDS = 's' |
Definition at line 46 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\seconds().
| const ILIAS\Data\DateFormat\DateFormat::SLASH = '/' |
Definition at line 31 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\slash().
| const ILIAS\Data\DateFormat\DateFormat::SPACE = ' ' |
Definition at line 32 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\space().
| const ILIAS\Data\DateFormat\DateFormat::TOKENS |
Definition at line 50 of file DateFormat.php.
| const ILIAS\Data\DateFormat\DateFormat::WEEK = 'W' |
Definition at line 37 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\week().
| const ILIAS\Data\DateFormat\DateFormat::WEEKDAY = 'l' |
Definition at line 35 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\weekday().
| const ILIAS\Data\DateFormat\DateFormat::WEEKDAY_SHORT = 'D' |
Definition at line 36 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\weekdayShort().
| const ILIAS\Data\DateFormat\DateFormat::YEAR = 'Y' |
Definition at line 41 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\year().
| const ILIAS\Data\DateFormat\DateFormat::YEAR_TWO_DIG = 'y' |
Definition at line 42 of file DateFormat.php.
Referenced by ILIAS\Data\DateFormat\FormatBuilder\twoDigitYear().