value-dt-test-YYYY-DDD--HH-MM-SS: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (fix copy/paste typo)
(add seconds to test case per name)
Line 10: Line 10:
[[value-class-pattern]] date and time parsing:
[[value-class-pattern]] date and time parsing:
* YYYY-DDD  
* YYYY-DDD  
* HH:MM
* HH:MM:SS
in an <span class="format">[[hCalendar]]</span> event.
in an <span class="format">[[hCalendar]]</span> event.


Line 21: Line 21:
<span class="dtstart">
<span class="dtstart">
   <span class="value">YYYY-DDD</span>  
   <span class="value">YYYY-DDD</span>  
   at <span class="value">HH:MM</span>
   at <span class="value">HH:MM:SS</span>
</span>
</span>
</source>
</source>
Line 33: Line 33:
     <span class="dtstart">
     <span class="dtstart">
         <span class="value">2009-276</span>  
         <span class="value">2009-276</span>  
     at <span class="value">17:09</span>
     at <span class="value">17:09:34</span>
     </span>
     </span>
</p>
</p>
Line 50: Line 50:
SUMMARY;LANGUAGE=en:serendipitous meet-up between Scott Beale and Tantek
SUMMARY;LANGUAGE=en:serendipitous meet-up between Scott Beale and Tantek
LOCATION:Four Barrel Coffee
LOCATION:Four Barrel Coffee
DTSTART;VALUE=DATE-TIME:20091003T170900
DTSTART;VALUE=DATE-TIME:20091003T170934
END:VEVENT
END:VEVENT
END:VCALENDAR
END:VCALENDAR
Line 60: Line 60:


<source lang=text>
<source lang=text>
DTSTART;VALUE=DATE-TIME:20091003T170900
DTSTART;VALUE=DATE-TIME:20091003T170934
</source>
</source>


Line 66: Line 66:


<source lang=text>
<source lang=text>
DTSTART:20091003T170900
DTSTART:20091003T170934
</source>
</source>



Revision as of 00:21, 4 October 2009

One of several value class pattern date and time value test cases. Marked up with the test-fixture poshformat.

author
Tantek Çelik

testing

value-class-pattern date and time parsing:

  • YYYY-DDD
  • HH:MM:SS

in an hCalendar event.

markup pattern

Here is the markup pattern fragment (escaped, and with abstract not real values) that is being tested:

<span class="dtstart">
  <span class="value">YYYY-DDD</span> 
  at <span class="value">HH:MM:SS</span>
</span>

test

hCalendar test in actual markup on the page (view or edit source to see actual hCalendar markup)

serendipitous meet-up between Scott Beale and Tantek at Four Barrel Coffee on 2009-276 at 17:09:34

expected iCalendar output

Here is the expected iCalendar output, omitting optional "X-" properties, and implementation specific "PRODID" property:

BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY;LANGUAGE=en:serendipitous meet-up between Scott Beale and Tantek
LOCATION:Four Barrel Coffee
DTSTART;VALUE=DATE-TIME:20091003T170934
END:VEVENT
END:VCALENDAR

The key line that an hCalendar to iCalendar converter must match in order to pass this test:

DTSTART;VALUE=DATE-TIME:20091003T170934

Acceptable variant:

DTSTART:20091003T170934

results

derivation

This test was derived from value-dt-test-abbr-YYYY-MM-DD--HH-MM.

see also