18 declare(strict_types=1);
    20 require_once(
"vendor/composer/vendor/autoload.php");
    27     protected DateFormat\Factory 
$df;
    32         $this->df = 
$f->dateFormat();
    37         $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->standard());
    38         $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->germanShort());
    39         $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->germanLong());
    40         $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->americanShort());
    41         $this->assertInstanceOf(
DateFormat\FormatBuilder::class, $this->df->custom());
    47             '.', 
',', 
'-', 
'/', 
' ', 
':', 
'd', 
'jS', 
'l', 
'D', 
'W', 
'm', 
'F', 
'M', 
'Y', 
'y', 
'h',
'H', 
'i', 
's', 
'a'    49         $format = $this->df->custom()
    50             ->dot()->comma()->dash()->slash()->space()->colon()
    51             ->day()->dayOrdinal()->weekday()->weekdayShort()
    52             ->week()->month()->monthSpelled()->monthSpelledShort()
    53             ->year()->twoDigitYear()
    54             ->hours12()->hours24()->minutes()->seconds()->meridiem()
    75         $this->expectException(InvalidArgumentException::class);
    76         new DateFormat\DateFormat([
'x', 
'2']);
    82         $format = $this->df->germanShort();
    83         $this->assertEquals(
"05.04.1985", $format->applyTo($dt));
    84         $this->assertEquals(
"05.04.1985", $dt->format((
string) $format));
    90         $format = $this->df->custom()
    91             ->day()->dot()->month()->dot()->year()
    92             ->space()->hours12()->colon()->minutes()->space()->meridiem()
    94         $this->assertEquals(
"05.04.1985 09:12 pm", $format->applyTo($dt));
    95         $this->assertEquals(
"05.04.1985 09:12 pm", $dt->format((
string) $format));
    96         $format = $this->df->custom()
    97             ->day()->dot()->month()->dot()->year()
    98             ->space()->hours24()->colon()->minutes()->colon()->seconds()
   100         $this->assertEquals(
"05.04.1985 21:12:30", $format->applyTo($dt));
   105         $format = $this->df->germanShort();
   106         $appended = $this->df->amend($format)->dot()->dot()->get();
   107         $this->assertInstanceOf(
DateFormat\DateFormat::class, $appended);
   109             array_merge($format->toArray(), [
'.', 
'.']),
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...