2009/dap/calendar TimezonedDate.html,NONE,1.1

Update of /sources/public/2009/dap/calendar
In directory hutz:/tmp/cvs-serv28848/calendar

Added Files:
	TimezonedDate.html 
Log Message:
First version of TimezonedDate proposal (read: a LOT of work still to do)

--- NEW FILE: TimezonedDate.html ---
<!DOCTYPE html>
<html>
  <head>
    <title>
      TimezonedDate
    </title>
    <meta
     http-equiv='Content-Type'
     content='text/html;charset=utf-8'>
<script
 type="text/javascript"
 src='../ReSpec.js/js/respec.js'
 class='remove'>
</script>
<script
 type="text/javascript"
 src='../ReSpec.js/js/sh_main.min.js'
 class='remove'>
</script>
<script
 type="text/javascript"
 class='remove'>
            var respecConfig = {
                specStatus: "ED",
                shortName: "timezoned-date",
                editors: [{
                    name: "Richard Tibbett",
                    company: "Opera Software ASA"
                }],
                //publishDate:  "2010-01-21",
                //previousPublishDate:  "2010-01-21",
                edDraftURI: "http://dev.w3.org/2009/dap/calendar/TimezonedDate.html",
                //lcEnd: "2009-08-05",
            };
        
</script>
<script
 type="text/javascript"
 src='../common/config.js'
 class='remove'>
        
</script>
<style>
/* BNF Styling */
        pre.bnf {
                text-align: left; padding: 4px;
                color: #000; background-color: #CCC;
                font-family: "Courier New", Courier, monospace; font-size: small;
        }
        pre.bnf dfn  { color: #900; }
        pre.bnf em   { color: #66F; background-color: #FFC; font-weight: normal; }
        pre.bnf .key { color: #33C; font-weight: bold; }
        pre.bnf .id  { color: #900; }
        pre.bnf .str { color: #000; background-color: #CFF; }
        pre.bnf .val { color: #066; }
        pre.bnf .rep { color: #909; }
        pre.bnf .oth { color: #000; background-color: #FCF; }
        pre.bnf .err { background-color: #FCC; }
        pre.bnf .add { background-color: #FFFF00; }
</style>
  </head>
  <body>
    <section
     id='abstract'>
      This specification defines an extension to ECMA <code>Date</code> and ISO-8601 Date to enable detailed time zone
      rules to be set, stored and communicated across formats.
    </section>
    <section
     class="informative">
      <h2>
        Introduction
      </h2>
      <p>
        Date objects in use on the web today allow only simple representations to denote a particular location&#39;s offset
        from Universal Coordinated Time (UTC). This is typically provided as a +/- offset from UTC-0 (also known as Greenwich Mean Time, or
        GMT) e.g., <code>+05:30</code> denoting that a location is 5 hours and 30 minutes ahead of UTC +00:00 (also known as Greenwich Mean Time - GMT).
      </p>
      <p>
        The issue with this method is not getting the correct local time whenever it is needed. The existing methods are sufficient for
        this purpose. The issue is correctly converting to and from local time and UTC for all points in time - in any of the past, present
        and future. This is important for defining relative dates, where a time in a given location may observe different UTC offsets
        according to any Daylight Savings Rules (DST) in effect or any other changes that may occur to a location's time zone made over time.
      </p>
      <p>
         Without the communication of the explicit time zone rules governing a given date and time, the ability to effectively calculate the offset of the local 
         time to UTC or to any other time zone at any point in the past or future is lost.
      </p>
<!--       
      <p>
        In practice, time zones are governed by highly dynamic rule sets that are applicable only to specific regions of the world. No
        particular algorithms govern a particular location&#39;s offset from UTC at any given time. Time zones can and do change on a
        regular basis, often subject to non-technical (e.g., political or socio-economic) factors.
      </p>
      <p>
        Furthermore, time zones are dynamic with a large number of locations around the world implementing a system of Daylight Savings
        Time (DST). Typically, DST rules can move clocks back and forth by a set interval from their standard UTC offset. Usage of DST
        rules occur for a number of political, socio-economic and other reasons: to maximise the availability of daylight during a change
        of season (e.g., United States, UK, Germany, France, Spain, Italy, etc), a religious event (e.g., Ramadan in Egypt) and/or to
        coincide with the celebration of public national holidays (e.g., Carnivale in Argentina and Brazil).
      </p>
      <p>
        Time zones can and do often change and so central coordination of these changes is helpful in determining time zones and time zone
        differences in and between different locations.
      </p>
-->
      <p>
        This specification introduces extensions to the ECMA <code>Date</code> object and the ISO-8601 standard for the communication and stringification of
        time zones rules with a given date and time object.
      </p>
    </section>
    <section>
      <h2>ECMA TimezonedDate Extension</h2>
      
      <p class="issue">
         TBW: Relationship of TimezonedDate to ECMA TC-39 Date object
      </p>
      <p>
      ...
      </p>
      
      <section>
         <h3>TimezonedDate Interface</h3>
         
         <p>
         ...
         </p>
         
         <p class="issue">
            We need a lot more constructors and optionality in constructors (e.g. [[[[hours], minutes], seconds], millis]. 
            <br /><br />Formatting WebIDL extended attributes (such as the Constructors) needs to be presented on separate lines in ReSpec.js (otherwise the page becomes very wide!).
         </p>
         
                         <dl title="[Constructor(), Constructor(year, month, day, hours, minutes, seconds, timezoneId)] interface TimezonedDate : Date" class='idl'>
                   <dt>
                        void setTimezone ()
                    </dt>
                    <dd>
                     <p>This method takes one argument.</p>
                  
                        <dl class='parameters'>
                            <dt>
                                DOMString timezoneId
                            </dt>
                            <dd>
                                The time zone identifier to assign to the current object.
                                <p class="note">TBW: Define application of this value to existing Date object.</p>
                            </dd>
                        </dl>
                    </dd>
                   <dt>
                        DOMString getTimezone ()
                    </dt>
                    <dd>
                     <p>Get the time zone identifier in use within the current object.</p>
                  
                  <p>This method takes no arguments. When called, it must return 
                  a <code>DOMString</code> object representing the time zone identifier.</p> 

                    </dd>
            </dl>
            
        <p>
         Objects that implement the <code>TimezonedDate</code> interface MUST
stringify as follows: 
         </p>
         <p>
By default the stringification of the object is
the value provided by the underlying ECMA Date interface minus any
time zone related time zone offset. If the internal 'timezoneId' attribute is not null, the
stringification of the object is the concatenation of the the response
from the underlying ECMA Date interface minus any time zone indicator,
the string " ", and the value of the applicable time zone offset as
identified by the current internal 'timezoneId' attribute in the form "GMT+HHMM[SS]" or
"GMT-HHMM[SS]". If the internal 'timezoneId' attribute is not null but cannot be
identified against a known time zone identifier, the stringification of
the object is the concatenation of the the response from the underlying
ECMA Date interface minus any time zone indicator, the string " ", and
the value of the current system's time zone offset as identified by the
system's clock in the form "GMT+HHMM[SS]" or "GMT-HHMM[SS].
        </p>
        
        <p class="issue">Relationship of stringification behavior to other ToString methods in Date objects needs to be defined.</p>
         
       </section>
    
    </section>
    <section>
      <h2>ISO 8601 TimezonedDate Extension</h2>
      
<p> 
   This information is based on the [[!ISO8601]] specification.
  
</p> 
<p> 
   [[!ISO8601]] does not specify a formal grammar for the date and time
   formats it defines.  The following is an attempt to create a formal
   grammar from [[!ISO8601]].  This is informational only and may contain
   errors. [[!ISO8601]] remains the authoritative reference.
  
</p> 
<p> 
   Note that due to ambiguities in ISO 8601, some interpretations had to
   be made.  First, ISO 8601 is not clear if mixtures of basic and
   extended format are permissible.  This grammar permits mixtures. ISO
   8601 is not clear on whether an hour of 24 is permissible only if
   minutes and seconds are 0.  This assumes that an hour of 24 is
   permissible in any context.   ISO 8601 states that the "T" may be omitted under some
   circumstances.  This grammar requires the "T" to avoid any ambiguity.
   ISO 8601 also requires (in section 5.3.1.3) that a decimal fraction
   be proceeded by a "0" if less than unity.  Annex B.2 of [[!ISO8601]]
   gives examples where the decimal fractions are not preceded by a "0".
   This grammar assumes section 5.3.1.3 is correct and that Annex B.2 is
   in error.
</p>

<pre class='example'>
 2010-07-17T17:14:23+01:00;Europe/London
 </pre> 
 
<pre class='example'>
 2010-07-17T17:14:23;Asia/Novosibirsk
 </pre>  

 <pre class='example'>
 2012-09-23T06:30Z;America/Los_Angeles
 </pre>
 
  <pre class='example'>
 2001-02-01T12+04:00;Etc/GMT
 </pre>
 
<section>
   <h2>Derived Date ABNF</h2>

<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre class="bnf"> 
   <dfn>date-century</dfn>        = <span class='rep'>2</span><cite class='key'>DIGIT</cite>  <em>; 00-99</em> 
   <dfn>date-decade</dfn>         =  <cite class='key'>DIGIT</cite>  <em>; 0-9</em> 
   <dfn>date-subdecade</dfn>      =  <cite class='key'>DIGIT</cite>  <em>; 0-9</em> 
   <dfn>date-year</dfn>           = date-decade date-subdecade 
   <dfn>date-fullyear</dfn>       = date-century date-year 
   <dfn>date-month</dfn>          = <span class='rep'>2</span><cite class='key'>DIGIT</cite>  <em>; 01-12</em> 
   <dfn>date-wday</dfn>           =  <cite class='key'>DIGIT</cite>  <em>; 1-7  ; 1 is Monday, 7 is Sunday</em> 
   <dfn>date-mday</dfn>           = <span class='rep'>2</span><cite class='key'>DIGIT</cite>  <em>; 01-28, 01-29, 01-30, 01-31 based on</em> 
                                 <em>; month/year</em> 
   <dfn>date-yday</dfn>           = <span class='rep'>3</span><cite class='key'>DIGIT</cite>  <em>; 001-365, 001-366 based on year</em> 
   <dfn>date-week</dfn>           = <span class='rep'>2</span><cite class='key'>DIGIT</cite>  <em>; 01-52, 01-53 based on year</em> 
 
   <dfn>datepart-fullyear</dfn>   = [date-century] date-year ["<span class='str'>-</span>"]
   <dfn>datepart-ptyear</dfn>     = "<span class='str'>-</span>" [date-subdecade ["<span class='str'>-</span>"]]
   <dfn>datepart-wkyear</dfn>     = datepart-ptyear / datepart-fullyear 
 
   <dfn>dateopt-century</dfn>     = "<span class='str'>-</span>" / date-century 
   <dfn>dateopt-fullyear</dfn>    = "<span class='str'>-</span>" / datepart-fullyear 
   <dfn>dateopt-year</dfn>        = "<span class='str'>-</span>" / (date-year ["<span class='str'>-</span>"])
   <dfn>dateopt-month</dfn>       = "<span class='str'>-</span>" / (date-month ["<span class='str'>-</span>"])
   <dfn>dateopt-week</dfn>        = "<span class='str'>-</span>" / (date-week ["<span class='str'>-</span>"])
 
   <dfn>datespec-full</dfn>       = datepart-fullyear date-month ["<span class='str'>-</span>"] date-mday 
   <dfn>datespec-year</dfn>       = date-century / dateopt-century date-year 
   <dfn>datespec-month</dfn>      = "<span class='str'>-</span>" dateopt-year date-month [["<span class='str'>-</span>"] date-mday]
   <dfn>datespec-mday</dfn>       = "<span class='str'>--</span>" dateopt-month date-mday 
   <dfn>datespec-week</dfn>       = datepart-wkyear "<span class='str'>W</span>"
                       (date-week / dateopt-week date-wday)
   <dfn>datespec-wday</dfn>       = "<span class='str'>---</span>" date-wday 
   <dfn>datespec-yday</dfn>       = dateopt-fullyear date-yday 
 
   <dfn>date</dfn>                = datespec-full / datespec-year 
                         / datespec-month / datespec-mday 
                         / datespec-week / datespec-wday 
                         / datespec-yday</pre></div> 
</section>

<section>
   <h2>Derived Time ABNF</h2>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre class="bnf">
 
   <dfn>time-hour</dfn>           = <span class='rep'>2</span><cite class='key'>DIGIT</cite> <em>; 00-24</em>
   <dfn>time-minute</dfn>         = <span class='rep'>2</span><cite class='key'>DIGIT</cite> <em>; 00-59</em>
   <dfn>time-second</dfn>         = <span class='rep'>2</span><cite class='key'>DIGIT</cite> <em>; 00-58, 00-59, 00-60 based on</em>
                                <em>; leap-second rules</em>
   <dfn>time-fraction</dfn>       = ("<span class='str'>,</span>" / "<span class='str'>.</span>") <span class='rep'>1</span>*<cite class='key'>DIGIT</cite>
   <dfn>time-numoffset</dfn>      = ("<span class='str'>+</span>" / "<span class='str'>-</span>") time-hour [["<span class='str'>:</span>"] time-minute]
   <dfn>time-zone</dfn>           = "<span class='str'>Z</span>" / time-numoffset
   <span class='add'><dfn>time-zone-id</dfn>        = "<span class='str'>;</span>" time-zone-id-prefix ["<span class='str'>/</span>" time-zone-id-suffix]</span>
   <span class='add'><dfn>time-zone-id-prefix</dfn> = &lt;<span class='rep'>any</span> <cite class='key'>TEXT</cite> except "<span class='str'>/</span>"&gt;</span>
   <span class='add'><dfn>time-zone-id-suffix</dfn> = &lt;<span class='rep'>any</span> <cite class='key'>TEXT</cite>&gt;</span>
 
   <dfn>timeopt-hour</dfn>        = "<span class='str'>-</span>" / (time-hour ["<span class='str'>:</span>"])
   <dfn>timeopt-minute</dfn>      = "<span class='str'>-</span>" / (time-minute ["<span class='str'>:</span>"])
 
   <dfn>timespec-hour</dfn>       = time-hour [["<span class='str'>:</span>"] time-minute [["<span class='str'>:</span>"] time-second]]
   <dfn>timespec-minute</dfn>     = timeopt-hour time-minute [["<span class='str'>:</span>"] time-second]
   <dfn>timespec-second</dfn>     = "<span class='str'>-</span>" timeopt-minute time-second
   <dfn>timespec-base</dfn>       = timespec-hour / timespec-minute / timespec-second
 
   <dfn>time</dfn>                = timespec-base [time-fraction] [time-zone] <span class='add'>[time-zone-id]</span>
 
   <dfn>iso-date-time</dfn>       = date "<span class='str'>T</span>" time</pre></div> 
   
</section>

<section>
   <h2>Derived Durations ABNF</h2>
   
   <div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre class="bnf"> 
   <dfn>dur-second</dfn>          = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>S</span>"
   <dfn>dur-minute</dfn>          = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>M</span>" [dur-second]
   <dfn>dur-hour</dfn>            = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>H</span>" [dur-minute]
   <dfn>dur-time</dfn>            = "T" (dur-hour / dur-minute / dur-second)
   <dfn>dur-day</dfn>             = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>D</span>"
   <dfn>dur-week</dfn>            = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>W</span>"
   <dfn>dur-month</dfn>           = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>M</span>" [dur-day]
   <dfn>dur-year</dfn>            = <span class='rep'>1</span>*<cite class='key'>DIGIT</cite> "<span class='str'>Y</span>" [dur-month]
   <dfn>dur-date</dfn>            = (dur-day / dur-month / dur-year) [dur-time]
 
   <dfn>duration</dfn>            = "<span class='str'>P</span>" (dur-date / dur-time / dur-week)</pre></div> 
</section>

<section>
   <h2>Derived Periods ABNF</h2>
   
   <div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre class="bnf"> 
   <dfn>period-explicit</dfn>     = iso-date-time "<span class='str'>/</span>" iso-date-time
   <dfn>period-start</dfn>        = iso-date-time "<span class='str'>/</span>" duration
   <dfn>period-end</dfn>          = duration "<span class='str'>/</span>" iso-date-time
 
   <dfn>period</dfn>              = period-explicit / period-start / period-end</pre></div>

</section>     
    
    </section>

  </body>
</html>

Received on Thursday, 5 August 2010 12:43:46 UTC