Difference between revisions of "API:EPrints/MetaField/Time"
Line 59: | Line 59: | ||
===iso_value=== | ===iso_value=== | ||
− | <source lang="perl">$datetime = $time->iso_value( $ | + | <source lang="perl">$datetime = $time->iso_value( $value ) |
</source> | </source> | ||
− | Returns | + | Returns $value in ISO datetime format (YYYY-MM-DDThh:mm:ssZ). |
Returns undef if the value is unset. | Returns undef if the value is unset. |
Latest revision as of 14:38, 11 April 2012
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::MetaField::Time - date + time
DESCRIPTION
Can store a time value upto seconds granularity. The time must be in UTC because this field can not store the time zone part.
The value is set and returned as a string formatted as:
YYYY-MM-DD hh:mm:ss
Where:
YYYY - year MM - month (01-12) DD - day (01-31) hh - hours (00-23) mm - minutes (00-59) ss - seconds (00-59)
Note: if you set the time using ISO datetime format (YYYY-MM-DDThh:mm:ssZ) it will automatically be converted into the native format.
PROPERTIES
In addition to those properties available in EPrints::MetaField::Date and EPrints::MetaField:
render_res
Reduce the resolution the date is shown as.
- "second"
- "minute"
- "hour"
METHODS
iso_value
$datetime = $time->iso_value( $value )
Returns $value in ISO datetime format (YYYY-MM-DDThh:mm:ssZ).
Returns undef if the value is unset.
SEE ALSO
COPYRIGHT
Copyright 2000-2011 University of Southampton.
This file is part of EPrints http://www.eprints.org/.
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.