ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclDatetimeRecordFieldModel.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 require_once('./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordFieldModel.php');
6 
16 
17  public function parseValue($value) {
18  return $value;
19  }
20 
21 
25  public function getValueFromExcel($excel, $row, $col) {
26  assert($excel instanceof ilExcel);
27 
28  $value = parent::getValueFromExcel($excel, $row, $col);
29 
30  return date('Y-m-d', strtotime($value));
31  }
32 
33 
41  public function parseExportValue($value) {
42  return substr($value, 0, 10);
43  }
44 
45 
55  public function parseSortingValue($value, $link = true) {
56  return strtotime($value);
57  }
58 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
parseSortingValue($value, $link=true)
Returns sortable value for the specific field-types.
parseExportValue($value)
Function to parse incoming data from form input value $value.