Difference between revisions of "Date field"

From EPrints Documentation
Jump to: navigation, search
(Description)
(Properties)
Line 15: Line 15:
 
| name || default || description  
 
| name || default || description  
 
|-
 
|-
| '''min_resolution''' || day || ...
+
| '''min_resolution''' || day || One of day|month|year. If set to "day" then values of YYYY or YYYY-MM will cause a validation error. If set to "month" then values of YYYY will cause a validation error. If set to "year" then day, month or year resolutions are allowed.
 
|-
 
|-
| '''render_res''' || day || ...
+
| '''render_res''' || day || One of day|month|year. If set to "year" then the dates 1998-10-01, 1998-10 and 1998 would all be rendered as "1998". This is not too useful in configuring the field, but can be set as a print option inside citation files.
 
|-
 
|-
| '''render_style''' || long || ...
+
| '''render_style''' || long || One of short|long. If "long" then you'll see "8 September 1998". If short then "08 Sep 1998".
 
|}
 
|}
  
 
== Required Phrases ==
 
== Required Phrases ==

Revision as of 18:04, 9 January 2007

Description

This field is used to store a single date. Internally EPrints always uses ISO standard notation for dates, it avoids confusion. This is YYYY-MM-DD.

In bibliographies sometimes exact dates of publication (or other events) are not known. EPrints allows you to store month and year values in date fields. YYYY or YYYY-MM.

In the database EPrints actually uses 3 integer fields to store the date, rather than a built in date field. This is because of the need to allow "NULL" in month and day if the date is just "1998".

Properties

name default description
min_resolution day month|year. If set to "day" then values of YYYY or YYYY-MM will cause a validation error. If set to "month" then values of YYYY will cause a validation error. If set to "year" then day, month or year resolutions are allowed.
render_res day month|year. If set to "year" then the dates 1998-10-01, 1998-10 and 1998 would all be rendered as "1998". This is not too useful in configuring the field, but can be set as a print option inside citation files.
render_style long long. If "long" then you'll see "8 September 1998". If short then "08 Sep 1998".

Required Phrases