|
| static | fromXapiTimestamp (string $xapiTimestamp) |
| |
| static | fromIliasDateTime (ilDateTime $dateTime) |
| |
| static | dateIntervalToISO860Duration (\DateInterval $d) |
| |
| static | _before (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='') |
| | compare two dates and check start is before end This method does not consider tz offsets. More...
|
| |
| static | _equals (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='') |
| | Check if two date are equal. More...
|
| |
| static | _after (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='') |
| | compare two dates and check start is after end This method does not consider tz offsets. More...
|
| |
| static | _within (ilDateTime $dt, ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='') |
| | Check whether an date is within a date duration given by start and end. More...
|
| |
Definition at line 30 of file class.ilCmiXapiDateTime.php.
◆ dateIntervalToISO860Duration()
| static ilCmiXapiDateTime::dateIntervalToISO860Duration |
( |
\DateInterval |
$d | ) |
|
|
static |
Definition at line 69 of file class.ilCmiXapiDateTime.php.
69 : string
70 {
71 $duration = 'P';
73 $duration .= "{$d->y}Y";
74 }
76 $duration .= "{$d->m}M";
77 }
79 $duration .= "{$d->d}D";
80 }
81 if (!empty(
$d->h) || !empty(
$d->i) || !empty(
$d->s)) {
82 $duration .= 'T';
84 $duration .= "{$d->h}H";
85 }
87 $duration .= "{$d->i}M";
88 }
90 $duration .= "{$d->s}S";
91 }
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110 }
111 if ($duration === 'P') {
112 $duration = 'PT0S';
113 }
114 return $duration;
115 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
References $d.
Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch().
◆ fromIliasDateTime()
| static ilCmiXapiDateTime::fromIliasDateTime |
( |
ilDateTime |
$dateTime | ) |
|
|
static |
◆ fromXapiTimestamp()
| static ilCmiXapiDateTime::fromXapiTimestamp |
( |
string |
$xapiTimestamp | ) |
|
|
static |
◆ toXapiTimestamp()
| ilCmiXapiDateTime::toXapiTimestamp |
( |
| ) |
|
Definition at line 38 of file class.ilCmiXapiDateTime.php.
38 : string
39 {
40 $phpDateTime = new DateTime();
41 $phpDateTime->setTimestamp((
int) $this->
get(
IL_CAL_UNIX));
42
43 return $phpDateTime->format(self::RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v);
44 }
References IL_CAL_UNIX.
◆ RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v
| const ilCmiXapiDateTime::RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v = 'Y-m-d\TH:i:s.uP' |
The documentation for this class was generated from the following file: