ILIAS  release_8 Revision v8.24
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}
const IL_CAL_DATE
Class for single dates.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
getValueFromExcel(ilExcel $excel, int $row, int $col)
parseExportValue($value)
Function to parse incoming data from form input value $value.