ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Factory.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 2019 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
4
namespace
ILIAS\Data\DateFormat
;
5
9
class
Factory
10
{
14
protected
$builder
;
15
16
public
function
__construct
(
FormatBuilder
$builder
)
17
{
18
$this->builder =
$builder
;
19
}
20
25
public
function
standard
() :
DateFormat
26
{
27
return
$this->builder->year()->dash()->month()->dash()->day()->get();
28
}
29
34
public
function
custom
() :
FormatBuilder
35
{
36
return
$this->builder
;
37
}
38
42
public
function
germanShort
() :
DateFormat
43
{
44
return
$this->builder->day()->dot()->month()->dot()->year()->get();
45
}
46
50
public
function
germanLong
() :
DateFormat
51
{
52
return
$this->builder->weekday()->comma()->space()
53
->day()->dot()->month()->dot()->year()->get();
54
}
55
}
ILIAS\Data\DateFormat\Factory\standard
standard()
Get the ISO 8601 date format (YYYY-MM-DD)
Definition:
Factory.php:25
ILIAS\Data\DateFormat\Factory\__construct
__construct(FormatBuilder $builder)
Definition:
Factory.php:16
ILIAS\Data\DateFormat\Factory\custom
custom()
Get the builder to define a custom DateFormat.
Definition:
Factory.php:34
ILIAS\Data\DateFormat\Factory
Factory for Date Formats.
Definition:
Factory.php:9
ILIAS\Data\DateFormat\FormatBuilder
Builds a Date Format with split up elements to ease conversion.
Definition:
FormatBuilder.php:10
ILIAS\Data\DateFormat\Factory\germanShort
germanShort()
Definition:
Factory.php:42
ILIAS\Data\DateFormat
Definition:
DateFormat.php:4
ILIAS\Data\DateFormat\Factory\$builder
$builder
Definition:
Factory.php:14
ILIAS\Data\DateFormat\Factory\germanLong
germanLong()
Definition:
Factory.php:50
src
Data
DateFormat
Factory.php
Generated on Sun Aug 31 2025 21:01:37 for ILIAS by
1.8.13 (using
Doxyfile
)