⧼vector-jumptocontent⧽

API:EPrints/MetaField/Time: Difference between revisions

From EPrints Documentation
New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_  
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/MetaField/Time.pm|package_name=EPrints::MetaField::Time}}[[Category:API|Time]]<!-- End of Pod2Wiki -->
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/MetaField/Time.pm|package_name=EPrints::MetaField::Time}}[[Category:API|TIME]][[Category:API:EPrints/MetaField|TIME]][[Category:API:EPrints/MetaField/Time|TIME]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
'''EPrints::MetaField::Time''' - no description


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
not done


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
==NAME==
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
EPrints::MetaField::Time - date + time
<!-- Pod2Wiki=item_form_value_basic -->==form_value_basic==


<!-- End of Pod2Wiki -->
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_get_basic_input_elements -->==get_basic_input_elements==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki=item_get_basic_input_ids -->==get_basic_input_ids==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_property_defaults -->==get_property_defaults==
<!-- Pod2Wiki=head_description -->
==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.


<!-- End of Pod2Wiki -->
The value is set and returned as a string formatted as:
<!-- Pod2Wiki=item_get_sql_names -->==get_sql_names==


<!-- End of Pod2Wiki -->
<pre>  YYYY-MM-DD hh:mm:ss</pre>
<!-- Pod2Wiki=item_get_sql_type -->==get_sql_type==


<!-- End of Pod2Wiki -->
Where:
<!-- Pod2Wiki=item_get_unsorted_values -->==get_unsorted_values==


<!-- End of Pod2Wiki -->
<pre>  YYYY - year
<!-- Pod2Wiki=item_get_value_label -->==get_value_label==
  MM - month (01-12)
  DD - day (01-31)
  hh - hours (00-23)
  mm - minutes (00-59)
  ss - seconds (00-59)</pre>


<!-- End of Pod2Wiki -->
Note: if you set the time using ISO datetime format (YYYY-MM-DDThh:mm:ssZ) it will automatically be converted into the native format.
<!-- Pod2Wiki=item_ordervalue_basic -->==ordervalue_basic==


<!-- End of Pod2Wiki -->
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_render_single_value -->==render_single_value==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki=item_render_xml_schema_type -->==render_xml_schema_type==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_should_reverse_order -->==should_reverse_order==
<!-- Pod2Wiki=head_properties -->
==PROPERTIES==
In addition to those properties available in [[API:EPrints/MetaField/Date|EPrints::MetaField::Date]] and [[API:EPrints/MetaField|EPrints::MetaField]]:


<!-- End of Pod2Wiki -->
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_sql_row_from_value -->==sql_row_from_value==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki=item_value_from_sql_row -->==value_from_sql_row==


<!-- End of Pod2Wiki -->
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
<!-- Pod2Wiki=head_render_res -->
===render_res===
Reduce the resolution the date is shown as.
 
* '''"second"'''
* "minute"
* "hour"
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_methods -->
==METHODS==
<!-- Pod2Wiki=head_iso_value -->
===iso_value===
 
<source lang="perl">$datetime = $time->iso_value( $value )
 
</source>
Returns $value in ISO datetime format (YYYY-MM-DDThh:mm:ssZ).
 
Returns undef if the value is unset.
 
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_see_also -->
==SEE ALSO==
[[API:EPrints/MetaField/Date|EPrints::MetaField::Date]].
 
<!-- Pod2Wiki=head_copyright -->
==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/.
 
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ -->
<!-- Edit below this comment -->

Latest revision as of 14:38, 11 April 2012

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


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

EPrints::MetaField::Date.

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/.