Proposed Resolution to Issue 18 – Extended time format 
version: 2014-07-29
Resolution:
Because the IANA tz form is commonly used in Java, Python and other implementation languages, implementers consider it desirable to support it, even though it extends the XML Schema standard forms in a way that has no formal designation.  The specification of FEEL conversion operators in clause 10.3.4 is therefore modified to support the IANA form as a valid alternative.
Revised text:
1.	In clause 10.3.4.1, at the end of the bulleted list (after * not null), ADD the following new bullets:
•	date string – a string value in the lexical space of the date datatype specified by XML Schema Part 2 Datatypes
•	time string – either 
a string value in the lexical space of the time datatype specified by XML Schema Part 2 Datatypes; or 
a string value that is the extended form of a local time representation as specified by ISO 8601, followed by the character "@", followed by a string value that is a time zone identifier in the IANA Time Zones Database (http://www.iana.org/time-zones)
•	date time string – a string value consisting of a date string value, as specified above, optionally followed by the character "T" followed by a time string value as specified above
•	duration string – a string value in the lexical space of the xs:dayTimeDuration or xs:yearMonthDuration datatypes specified by the XQuery 1.0 and XPath 2.0 Data Model.
2.	In clause 10.3.4.1 Table 54 (beta-3), 
a.  REPLACE the Parameter Domain cell "string1" with "date string"
b.  REPLACE the Parameter Domain cell "string2" with "date time string"
c.  REPLACE the Parameter Domain cell "string3" with "time string"
d.  REPLACE the Parameter Domain cell "number, number4" with:
"number, number in the range [−6111..6176]"
e.  REPLACE the Parameter Domain cell "all 3 are string5" with:
 "string1, string, string"
f.  REPLACE the Parameter Domain cell "string6" with "duration string"
g.  In the time(from):string row, REPLACE the Example cell with:
time("23:59:00z") + duration("PT2M") = time("00:01:00@Etc/UTC")
3.	In clause 10.3.4.1,after the Table, DELETE all of the following: 
"Additional constraints on input domains: 
1. from SHALL be in the lexical space of xs:date [ref xml schema] 
2. from SHALL be in the lexical space of xs:dateTime [ref xml schema] 
3. from SHALL be in the lexical space of xs:time [ref xml schema] 
4. scale is in the range [−6111..6176] 
5. grouping separator is space (' '), comma (','), period ('.'), or null. Decimal separator is period, comma, or null, but not the same as the grouping separator (unless null). from must have syntax specified by grammar rule 37, after removing grouping separators (if not null) and after changing the decimal separator (if not null) to a period. 
6. from must be in the lexical space of the xs:dayTimeDuration or xs:yearMonthDuration [ref xpath]
Issues:
1. Extended time zone, e.g. 23:59:00@America/Los_Angeles"
and ADD (replacing the current note 5):
"1	grouping SHALL be one of space (' '), comma (','), period ('.'), or null.
	decimal SHALL be one of period, comma, or null, but SHALL NOT be the same as the grouping separator unless both are null. 
	from SHALL conform to grammar rule 37, after removing all occurrences of the grouping separator, if any, and after changing the decimal separator, if present, to a period."
[NOTE:  In Beta-3, the ‘additional constraints...’ precede the Table, but in Beta-1 they follow it.  The intent is that the new footnote should follow the table.]
4.	In 10.3.2.2.4 (time, 10.3.2.3.4 beta3), in the first paragraph, DELETE the sentences:
The literal format of the characters within the quotes of the string literal is defined by the lexical space of the XML Schema time datatype. A time in the semantic domain is a sequence of numbers for the hour, minute, second, and optional timezone offset.
and REPLACE them with: “(See 10.3.4.1.)”, followed by a new paragraph:
A time in the semantic domain is a value of the XML Schema time datatype.  It can be represented by a sequence of numbers for the hour, minute, second, and an optional time offset from Universal Coordinated Time (UTC).  If a time offset is specified, including time offset = 00:00, the time value has a UTC form and is comparable to all time values that have UTC forms.  If no time offset is specified, the time is interpreted as a local time of day at some location, whose relationship to UTC time is dependent on time zone rules for that location, and may vary from day to day.  A local time of day value is only sometimes comparable to UTC time values, as described in XML Schema Part 2 Datatypes.
5.	In 10.3.2.2 (10.3.2.3 beta3), immediately before 10.3.2.2.5 (10.3.2.3.5 beta3), INSERT a new subsection, renumbering the subsequent sections:
10.3.2.x.5 date
FEEL does not have date literals, although it uses boldface date literals to represent values in the semantic domain. Dates can be expressed using a string literal and the date() built-in function (see 10.3.4.1).  A date in the semantic domain is a sequence of numbers for the year, month, day of month.  The year must be in the range [-999,999,999..999,999,999].
Where necessary, including the valuedt function (see 10.3.2.x.6), a date value is considered to be equivalent to a date time value in which the time of day is UTC midnight (00:00:00).
6.	In the existing subclause 10.3.2.2.5 ((10.3.2.3.5 beta3, which will be renumbered) 
a.  CHANGE the title from “date and date-time” TO “date-time”
b.  REPLACE the entire first paragraph of the section WITH
FEEL does not have date-time literals, although it uses boldface date-time literals to represent values in the semantic domain.  Date-times can be expressed using a string literal and the date and time() built-in function (see 10.3.4.1). 
A date and time in the semantic domain is a sequence of numbers for the year, month, day, hour, minute, second, and optional time offset from Universal Coordinated Time (UTC). The year must be in the range [-999,999,999..999,999,999].  If there is an associated time offset, including 00:00, the date-time value has a UTC form and  is comparable to all other date-time values that have UTC forms.  If there is no associated time offset, the time is taken to be a local time of day at some location, according to the time zone rules for that location.  When the time zone is specified, e.g., using the IANA tz form (see 10.3.4.1), the date-time value may be converted to a UTC form using the time zone rules for that location, if applicable.
Note: projecting timezone rules into the future may only be safe for near-term date-time values.
c.  In the second paragraph, beginning “A date and time d”, INSERT “that has a UTC form” after “d”, so that it reads:
A date and time d that has a UTC form can be represented ...
7.	In Table 37 (beta3) (Equality), before the date and time row, INSERT a new row:
date	all 3 components (10.3.2.3.5) must be equal
8.	In Table 38 (beta3) (Inequality), before the date and time row, INSERT a new row
date	e1 < e2 if the year value of e1 < the year value of e2
e1 < e2 if the year values are equal and the month value of e1 < the month value of e2
e1 < e2 if the year and month values are equal and the day value of e1 < the day value of e2
 9.	In Table 49 (e.name), REPLACE the first two rows (date and time, time) with three rows:
date	result is the named component of the date object e. Valid names are shown to the right.	year, month, day	
date and time	result is the named component of the date and time object e. Valid names are shown to the right. time offset and timezone may be null	year, month, day, hour, minute, second, time offset, timezone	
time	result is the named component of the time object e. Valid names are shown to the right. time offset and timezone may be null	hour, minute, second, time offset, timezone