|
static | fromXapiTimestamp ($xapiTimestamp) |
|
static | fromIliasDateTime (ilDateTime $dateTime) |
|
static | dateIntervalToISO860Duration (\DateInterval $d) |
|
static | _before (ilDateTime $start, ilDateTime $end, $a_compare_field='', $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, $a_compare_field='', $a_tz='') |
| Check if two date are equal. More...
|
|
static | _after (ilDateTime $start, ilDateTime $end, $a_compare_field='', $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, $a_compare_field='', $a_tz='') |
| Check whether an date is within a date duration given by start and end. More...
|
|
Definition at line 15 of file class.ilCmiXapiDateTime.php.
◆ dateIntervalToISO860Duration()
static ilCmiXapiDateTime::dateIntervalToISO860Duration |
( |
\DateInterval |
$d | ) |
|
|
static |
Definition at line 62 of file class.ilCmiXapiDateTime.php.
62 {
63 $duration = 'P';
65 $duration .= "{$d->y}Y";
66 }
68 $duration .= "{$d->m}M";
69 }
71 $duration .= "{$d->d}D";
72 }
73 if (!empty(
$d->h) || !empty(
$d->i) || !empty(
$d->s)) {
74 $duration .= 'T';
76 $duration .= "{$d->h}H";
77 }
79 $duration .= "{$d->i}M";
80 }
82 $duration .= "{$d->s}S";
83 }
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102 }
103 if ($duration === 'P') {
104 $duration = 'PT0S';
105 }
106 return $duration;
107 }
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 |
( |
|
$xapiTimestamp | ) |
|
|
static |
◆ toXapiTimestamp()
ilCmiXapiDateTime::toXapiTimestamp |
( |
| ) |
|
- Returns
- string
- Exceptions
-
Definition at line 27 of file class.ilCmiXapiDateTime.php.
28 {
29 $phpDateTime = new DateTime();
30 $phpDateTime->setTimestamp($this->
get(
IL_CAL_UNIX));
31
32 return $phpDateTime->format(self::RFC3336_EXTENDED_FIXED_USING_u_INSTEAD_OF_v);
33 }
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: