mirror of https://github.com/apache/lucene.git
moved DateField format question so it shows up in javadocs
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@398012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1898a8adbe
commit
0359b97c80
|
@ -26,41 +26,50 @@ import org.apache.solr.search.function.OrdFieldSource;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/***
|
// TODO: make a FlexibleDateField that can accept dates in multiple
|
||||||
Date Format for the XML, incoming and outgoing:
|
// formats, better for human entered dates.
|
||||||
|
|
||||||
A date field shall be of the form 1995-12-31T23:59:59Z
|
// TODO: make a DayField that only stores the day?
|
||||||
The trailing "Z" designates UTC time and is mandatory.
|
|
||||||
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
|
||||||
All other parts are mandatory.
|
|
||||||
|
|
||||||
This format was derived to be standards compliant (ISO 8601) and is a more
|
|
||||||
restricted form of the canonical representation of dateTime from XML schema part 2.
|
|
||||||
http://www.w3.org/TR/xmlschema-2/#dateTime
|
|
||||||
|
|
||||||
"In 1970 the Coordinated Universal Time system was devised by an international
|
/**
|
||||||
advisory group of technical experts within the International Telecommunication
|
* FieldType that can represent any Date/Time with millisecond precisison.
|
||||||
Union (ITU). The ITU felt it was best to designate a single abbreviation for
|
* <p>
|
||||||
use in all languages in order to minimize confusion. Since unanimous agreement
|
* Date Format for the XML, incoming and outgoing:
|
||||||
could not be achieved on using either the English word order, CUT, or the
|
* </p>
|
||||||
French word order, TUC, the acronym UTC was chosen as a compromise."
|
* <blockquote>
|
||||||
***/
|
* A date field shall be of the form 1995-12-31T23:59:59Z
|
||||||
|
* The trailing "Z" designates UTC time and is mandatory.
|
||||||
|
* Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
||||||
|
* All other parts are mandatory.
|
||||||
|
* </blockquote>
|
||||||
|
* <p>
|
||||||
|
* This format was derived to be standards compliant (ISO 8601) and is a more
|
||||||
|
* restricted form of the canonical representation of dateTime from XML
|
||||||
|
* schema part 2.
|
||||||
|
* http://www.w3.org/TR/xmlschema-2/#dateTime
|
||||||
|
* </p>
|
||||||
|
* <blockquote>
|
||||||
|
* "In 1970 the Coordinated Universal Time system was devised by an
|
||||||
|
* international advisory group of technical experts within the International
|
||||||
|
* Telecommunication Union (ITU). The ITU felt it was best to designate a
|
||||||
|
* single abbreviation for use in all languages in order to minimize
|
||||||
|
* confusion. Since unanimous agreement could not be achieved on using
|
||||||
|
* either the English word order, CUT, or the French word order, TUC, the
|
||||||
|
* acronym UTC was chosen as a compromise."
|
||||||
|
* </blockquote>
|
||||||
|
*
|
||||||
|
* @author yonik
|
||||||
|
* @version $Id$
|
||||||
|
* @see <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML schema part 2</a>
|
||||||
|
*/
|
||||||
|
public class DateField extends FieldType {
|
||||||
|
|
||||||
// The XML (external) date format will sort correctly, except if
|
// The XML (external) date format will sort correctly, except if
|
||||||
// fractions of seconds are present (because '.' is lower than 'Z').
|
// fractions of seconds are present (because '.' is lower than 'Z').
|
||||||
// The easiest fix is to simply remove the 'Z' for the internal
|
// The easiest fix is to simply remove the 'Z' for the internal
|
||||||
// format.
|
// format.
|
||||||
|
|
||||||
// TODO: make a FlexibleDateField that can accept dates in multiple
|
|
||||||
// formats, better for human entered dates.
|
|
||||||
|
|
||||||
// TODO: make a DayField that only stores the day?
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author yonik
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class DateField extends FieldType {
|
|
||||||
protected void init(IndexSchema schema, Map<String,String> args) {
|
protected void init(IndexSchema schema, Map<String,String> args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue