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();
65 $duration .=
"{$d->y}Y";
68 $duration .=
"{$d->m}M";
71 $duration .=
"{$d->d}D";
73 if (!empty(
$d->h) || !empty(
$d->i) || !empty(
$d->s)) {
76 $duration .=
"{$d->h}H";
79 $duration .=
"{$d->i}M";
82 $duration .=
"{$d->s}S";
103 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