Difference between revisions of "API:EPrints/MetaField/Date"

From EPrints Documentation
Jump to: navigation, search
(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. -...)
 
 
(6 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/Date.pm|package_name=EPrints::MetaField::Date}}[[Category:API|Date]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/MetaField/Date.pm|package_name=EPrints::MetaField::Date}}[[Category:API|DATE]][[Category:API:EPrints/MetaField|DATE]][[Category:API:EPrints/MetaField/Date|DATE]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::MetaField::Date''' - 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::Date - dates
<!-- Pod2Wiki=item_form_value_basic -->==form_value_basic==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_from_search_form -->==from_search_form==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_basic_input_elements -->==get_basic_input_elements==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_basic_input_ids -->==get_basic_input_ids==
+
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 +
This field is used to store a single date. The notation used is <code>YYYY-MM-DD</code>, where <code>YYYY</code> is the 4-digit year, <code>MM</code> is the 2 digit month (starting at 01) and <code>DD</code> is the 2 digit day of the month (starting at 01).
  
<!-- End of Pod2Wiki -->
+
<code>MM</code> and <code>DD</code> may be omitted, giving the following possible values:
<!-- Pod2Wiki=item_get_ids_by_value -->==get_ids_by_value==
 
  
<!-- End of Pod2Wiki -->
+
<pre>  YYYY-MM-DD
<!-- Pod2Wiki=item_get_property_defaults -->==get_property_defaults==
+
  YYYY-MM
 +
  YYYY</pre>
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_get_resolution -->==get_resolution==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_search_conditions -->==get_search_conditions==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_search_conditions_not_ex -->==get_search_conditions_not_ex==
+
<!-- Pod2Wiki=head_database -->
 +
===Database===
 +
* [fieldname]_year SQL_SMALLINT
 +
* [fieldname]_month SQL_TINYINT
 +
* [fieldname]_day SQL_TINYINT
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_search_group -->==get_search_group==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_sql_names -->==get_sql_names==
+
<!-- Pod2Wiki=head_searching -->
 +
===Searching===
 +
Date fields can be searched as either single values or ranges. Searching for "2006" will also match 2006-12-25. You can search for "2000.." to search dates in or after 2000. Or "2000-12..2003-01" for December 2000 through January 2003.
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_get_sql_type -->==get_sql_type==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_unsorted_values -->==get_unsorted_values==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_value_label -->==get_value_label==
+
<!-- Pod2Wiki=head_properties -->
 +
==PROPERTIES==
 +
In addition to those properties available in [[API:EPrints/MetaField|EPrints::MetaField]]:
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_render_search_input -->==render_search_input==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_search_value -->==render_search_value==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_render_single_value -->==render_single_value==
+
<!-- Pod2Wiki=head_input_style -->
 +
===input_style===
 +
* "long"
 +
: Render labeled text entry boxes for year, month and day.
  
<!-- End of Pod2Wiki -->
+
* '''"short"'''
<!-- Pod2Wiki=item_render_xml_schema_type -->==render_xml_schema_type==
+
: Render a single text entry box with a Javascript date picker.
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_should_reverse_order -->==should_reverse_order==
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_sql_row_from_value -->==sql_row_from_value==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_trim_date -->==trim_date==
+
<!-- Pod2Wiki=head_render_res -->
 +
===render_res===
 +
Reduce the resolution the date is shown as.
  
<!-- End of Pod2Wiki -->
+
* '''"day"'''
<!-- Pod2Wiki=item_value_from_sql_row -->==value_from_sql_row==
+
* "month"
 +
* "year"
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
+
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
 +
<!-- Pod2Wiki=head_render_style -->
 +
===render_style===
 +
* '''"long"'''
 +
: Render the full month name.
 +
 
 +
* "short"
 +
: Render an abbreviated month name.
 +
 
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
<!-- Pod2Wiki=head_methods -->
 +
==METHODS==
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
<!-- 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:31, 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


API: Core API

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


NAME

EPrints::MetaField::Date - dates


DESCRIPTION

This field is used to store a single date. The notation used is YYYY-MM-DD, where YYYY is the 4-digit year, MM is the 2 digit month (starting at 01) and DD is the 2 digit day of the month (starting at 01).

MM and DD may be omitted, giving the following possible values:

  YYYY-MM-DD
  YYYY-MM
  YYYY


Database

  • [fieldname]_year SQL_SMALLINT
  • [fieldname]_month SQL_TINYINT
  • [fieldname]_day SQL_TINYINT


Searching

Date fields can be searched as either single values or ranges. Searching for "2006" will also match 2006-12-25. You can search for "2000.." to search dates in or after 2000. Or "2000-12..2003-01" for December 2000 through January 2003.


PROPERTIES

In addition to those properties available in EPrints::MetaField:


input_style

  • "long"
Render labeled text entry boxes for year, month and day.
  • "short"
Render a single text entry box with a Javascript date picker.


render_res

Reduce the resolution the date is shown as.

  • "day"
  • "month"
  • "year"


render_style

  • "long"
Render the full month name.
  • "short"
Render an abbreviated month name.


METHODS

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