ESS:Dates

From ESS
Jump to: navigation, search
Format ESS
Ess-feed-icon.png
.ess, .xml
application/ess+xml
version 0.9

"Dates" definition

An event is comprised of several attributes, one of the most important being when the event takes place. An event can be unique/one time or recurring. Event dates are represented in ESS through two <item> element "type" attributes. These types represent every time and date situation:

standalone event icon recurrent event icon permanent event icon date range event icon

STANDALONE EVENT

RECURRENT EVENT

PERMANENT EVENT

DATE RANGE EVENT

Less than one day.

Repeats itself recursively.

Constantly active

Happens over several days.

ESS <dates> structure

ESS documents are composed of various main XML elements. ESS processors must consider each and every element's description as valid and applicable to each and every other XML element within the same ESS document. If it is not the case, it belongs to another <ess> feed to describe this event parameter.
Example: every <prices> items must be valid and applicable to every <dates> and <places> items within the same <ess> feed.

<dates> XML element (ess:dates) must be defined within ESS Documents, it is a mandatory ESS XML element.
This section describes the interaction between ESS events and the dates. <dates> (ess:dates) XML element must be composed by, at least, one <item> (ess:item) XML element.
Several <item> elements can be defined within <dates> XML structure to represent events that happen at several different times.


Dates <item @attibutes>


Name Description Type Required
type The "type" attribute can have three values: "standalone", permanent or "recurrent" to represent if the event has a simple unique date, is constantly available or repeats itself several times. In the case of a type="recurrent", the "unit" attibute must be defined. ESS Processors should consider that "standalone" is the default "type" attribute value if it is not specified. String TRUE
unit The "unit" attribute applies only if type="recurrent" is specified. The "unit" attribute can take five values: "hour", "day", "week", "month" or "year". ESS processors should consider unit="hour" as the default "unit" attribute if it is not specified. String TRUE
FALSE
limit The "limit" attribute applies only if type="recurrent" is specified. The "limit" attribute is optional and defines the number of times the recurrent event <item> will happen. If the "limit" attribute is not specified or if limit="0" ESS Processors should consider the <item> as infinite. Number FALSE
interval The "interval" attribute applies only if type="recurrent" is specified. The "interval" attribute is optional and defines the number of times the recurrent event <item> have to be repeated according to the unit="xxx" attribute value. If the "interval" attribute is not specified ESS Processors should be considered the <item> with a interval="1". Number FALSE
selected_day The "selected_day" attribute applies only if type="recurrent" is specified. The "selected_day" attribute can take eight values: "number", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" or "sunday". The "selected_day" attribute only applied if unit="week", unit="month" or unit="year". The "selected_day" attribute is optional and defines the number of "unit" attribute that have to be repeated. Several values can be specified with a coma separation. If no "selected_day" have been specified ESS Processors should consider the maximum of possibilities as to be repeated. String FALSE
selected_week The "selected_week" attribute applies only if type="recurrent" is specified. The "selected_week" attribute can take five values: "first", "second", "third", "fourth" or "last". The "selected_week" attribute only applies if unit="month". The "selected_week" attribute is optional and defines the section of the month that have to be repeated. Several values can be specified with a coma separation. If no "selected_week" have been specified ESS Processors should consider the maximum of possibilities as to be repeated. String FALSE
priority The "priority" attribute refers to the order and the preference applied to each <item> XML element. ESS processors should consider the natural XML position as the priority if this attribute is not defined. Number FALSE




Dates <item> childs elements


Name Description Type Required
<name> Language-sensitive date name. Should not be longer then 64 chars String TRUE
<description> This optional XML element contains the date description. Using HTML tags inside this XML element is possible but should be limited to the minimum necessary because ESS processors could use this information in an environment that can not read HTML. String FALSE
<start> Defines event starting Date. Date RFC3339 TRUE
<duration> Defines event time duration in seconds and starting from <start> Date value. If the <item> is with a type="recurrent", the duration value applies for each recurrency. Number FALSE




ESS dates sample

DTD description http://essfeed.org/history/0.9

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ess PUBLIC "-//ESS//DTD" "http://essfeed.org/history/0.9/index.dtd">
<ess xmlns="http://essfeed.org/history/0.9" version="0.9" lang="en">
   ...
   <dates>
 
      <!-- 1 | Simple one-shot event that happens 
               Tuesday, March 3, 2013 
               at 7pm (GMT) and for 2 hours -->
      <item type="standalone">
         <name>Tuesday movie</name>
         <start>2012-03-01T19:00:00Z</start>
         <duration>7200</duration>
      </item>
 
      <!-- 2 | Event for a specific day 
               that repeats every first of the month 
               for 6 months at 9am Pacific Standard Time (GMT-08:00) 
               and for 3 hours -->
      <item type="recurrent" unit="month" limit="6">
         <name>Every month event</name>
         <start>2012-01-01T09:00:00-08:00</start>
         <duration>86400</duration>
      </item>
 
       <!-- 3 | Event that repeats bimonthly for one year 
                on the last Sunday of each month
                starting at 8am Pacific Standard Time (GMT-08:00) 
                and for 10 hours -->
       <item type="recurrent" unit="month" interval="2" limit="12" selected_day="sunday" selected_week="last">
          <name>Bimonthly event</name>
          <start>2013-04-01T08:00:00-08:00</start>
          <duration>36000</duration>
       </item>
 
       <!-- 4 | Every 3 weeks event (without time limit) 
                that happends every Friday, Saturday and Sunday
                starting at 22am Pacific Standard Time (GMT-08:00) 
                and for 2 hours -->
       <item type="recurrent" unit="week" interval="3" selected_day="friday,saturday,sunday">
          <name>Every 3 weeks event</name>
          <start>2013-04-01T08:00:00-08:00</start>
          <duration>7200</duration>
       </item>
 
       <!-- 5 | Christmas Diner in San Francisco!  -->
       <item type="recurrent" unit="year">
          <name>Christmas Dinner</name>
          <start>2013-12-25T20:30:00-0800</start>
          <duration>7200</duration>
       </item>
 
   </dates>
   ...
</ess>




Specific dates situations

Each <item> XML element represents a continuous period of time (without breaks). A type="recurrent" means that the exact date replicates itself for a limit="xx" number of times (if no limit attribute is specified, it must be interpreted as an event that never ends).

Each event has its own particulars, for example if an event occurs:

  • Thursday the 27th from 8am to 10pm.
  • Friday the 28th from 9am to 11pm .
  • Saturday the 29th from 12pm to 2pm.

in Pacific Standard Time (GMT-08:00)
and repeats itself for 3 weeks.

The result will be:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ess PUBLIC "-//ESS//DTD" "http://essfeed.org/history/0.9/index.dtd">
<ess xmlns="http://essfeed.org/history/0.9" version="0.9" lang="en">
   ...
   <dates>
 
      <!-- 1 | Recurrent event starting Thursday the 27th for 3 weeks (27th, 4th and the 11th) -->
      <item type="recurrent" unit="week" limit="3">
         <name>Tuesday event</name>
         <start>2013-03-27T08:00:00-0800</start><!-- Starting at 8am Thursday the 27th --> 
         <duration>50400</duration><!-- lasts for 14 hours = 14x60x60=50400 seconds -->
      </item>
 
      <!-- 2 | Recurrent event starting Friday the 28th for 3 weeks (28th, 5th and the 12th) -->
      <item type="recurrent" unit="week" limit="3">
         <name>Friday event</name>
         <start>2013-03-28T09:00:00-0800</start><!-- Starting at 9am Friday the 28th --> 
         <duration>86400</duration><!-- lasts for 14 hours = 14x60x60=50400 seconds -->
      </item>
 
      <!-- 3 | Recurrent event starting Saturday the 29th for 3 weeks (29th, 6th and the 13th) -->
      <item type="recurrent" unit="week" limit="3">
         <name>Saturday event</name>
         <start>2013-03-29T12:00:00-0800</start><!-- Starting at 12pm Saturday the 29th --> 
         <duration>10800</duration><!-- lasts for for 3 hours = 3x60x60=10800 seconds -->
      </item>
 
   </dates>
   ...
</ess>



Discussions

ESS Forum Discussion > Dates

Could not find wordpress article with a title like home








External documentation

Ietf logo.png

ESS standard under RFC validation process: RFC ESS Draft

  • RFC 3076 : Canonical XML Version 1.0
  • RFC 3339 : Date and Time on the Internet: Timestamps
  • RFC 3987 : Internationalized Resource Identifiers (IRIs)
  • ISO 8601 : Wikipedia ISO 8601

-->

IF EVENTS MATTER TO YOU

Spread the news about ESS
Personal tools
Actions
Standard


Developers


Communication