29 $phpDateTime =
new DateTime();
30 $phpDateTime->setTimestamp($this->
get(
IL_CAL_UNIX));
32 return $phpDateTime->format(self::RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v);
42 $phpDateTime = DateTime::createFromFormat(
43 self::RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v,
47 $unixTimestamp = $phpDateTime->getTimestamp();
66 $duration .=
"{$d->y}Y";
69 $duration .=
"{$d->m}M";
72 $duration .=
"{$d->d}D";
74 if (!empty(
$d->h) || !empty(
$d->i) || !empty(
$d->s)) {
77 $duration .=
"{$d->h}H";
80 $duration .=
"{$d->i}M";
83 $duration .=
"{$d->s}S";
104 if ($duration ===
'P') {
An exception for terminatinating execution or to throw for unit testing.
static fromIliasDateTime(ilDateTime $dateTime)
const RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v
static dateIntervalToISO860Duration(\DateInterval $d)
static fromXapiTimestamp($xapiTimestamp)
@classDescription Date and time handling
get($a_format, $a_format_str='', $a_tz='')
get formatted date
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d