ILIAS
trunk Revision v11.0_alpha-1713-gd8962da2f67
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
trait.ilDclDatetimeRecordDateFormatter.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
trait
ilDclDatetimeRecordDateFormatter
22
{
23
protected
function
formatDateFromString(
string
$value):
string
24
{
25
return
$this->formatDateFromInt(strtotime($value));
26
}
27
28
protected
function
formatDateFromInt(
int
$timestamp
):
string
29
{
30
$format = $this->getUserDateFormat();
31
switch
($format) {
32
case
ilCalendarSettings::DATE_FORMAT_DMY
:
33
return
date(
"d.m.Y"
, $timestamp);
34
case
ilCalendarSettings::DATE_FORMAT_YMD
:
35
return
date(
"Y-m-d"
, $timestamp);
36
case
ilCalendarSettings::DATE_FORMAT_MDY
:
37
return
date(
"m/d/Y"
, $timestamp);
38
default
:
39
return
date($format, $timestamp);
40
}
41
42
return
$this->
lng
->txt(
'no_date'
);
43
}
44
45
abstract
protected
function
getUserDateFormat(): string;
46
}
ilCalendarSettings\DATE_FORMAT_DMY
const DATE_FORMAT_DMY
Definition:
class.ilCalendarSettings.php:34
ilDclDatetimeRecordDateFormatter
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
ilCalendarSettings\DATE_FORMAT_MDY
const DATE_FORMAT_MDY
Definition:
class.ilCalendarSettings.php:36
$timestamp
foreach($mandatory_scripts as $file) $timestamp
Definition:
buildRTE.php:70
ilCalendarSettings\DATE_FORMAT_YMD
const DATE_FORMAT_YMD
Definition:
class.ilCalendarSettings.php:35
components
ILIAS
DataCollection
classes
Fields
Datetime
trait.ilDclDatetimeRecordDateFormatter.php
Generated on Fri Apr 4 2025 23:02:59 for ILIAS by
1.8.13 (using
Doxyfile
)