ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilDclDatetimeRecordFieldModel.php
Go to the documentation of this file.
1 <?php
2 
20 {
24  public function parseValue($value): string
25  {
26  return (string) $value;
27  }
28 
29  public function getValueFromExcel(ilExcel $excel, int $row, int $col): ?string
30  {
31  $value = parent::getValueFromExcel($excel, $row, $col);
32 
33  return date('Y-m-d', strtotime($value));
34  }
35 
40  public function parseExportValue($value): ?string
41  {
42  $date = new ilDate($value, IL_CAL_DATE);
43  return $date->get(IL_CAL_DATE);
44  }
45 
50  public function parseSortingValue($value, bool $link = true): ?int
51  {
52  return strtotime($value);
53  }
54 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseSortingValue($value, bool $link=true)
Returns sortable value for the specific field-types.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValueFromExcel(ilExcel $excel, int $row, int $col)
const IL_CAL_DATE
parseExportValue($value)
Function to parse incoming data from form input value $value.