ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Current.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
8 class Current
9 {
27  public static function today()
28  {
29  $dti = new DateTimeImmutable();
30  $dateArray = date_parse($dti->format('c'));
31 
32  return is_array($dateArray) ? Helpers::returnIn3FormatsArray($dateArray, true) : Functions::VALUE();
33  }
34 
52  public static function now()
53  {
54  $dti = new DateTimeImmutable();
55  $dateArray = date_parse($dti->format('c'));
56 
57  return is_array($dateArray) ? Helpers::returnIn3FormatsArray($dateArray) : Functions::VALUE();
58  }
59 }
static returnIn3FormatsArray(array $dateArray, bool $noFrac=false)
Return result in one of three formats.
Definition: Helpers.php:138