API:EPrints/MetaField/Date

From EPrints Documentation
Revision as of 14:26, 11 April 2012 by Tdb01r (talk | contribs)
Jump to: navigation, search

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.


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