value-dt-test-abbr-YYYY-MM-DD--HH-MM: Difference between revisions
GlennJones (talk | contribs) (Added test-fixture asserts) |
GlennJones (talk | contribs) (UfXtract passed test) |
||
Line 91: | Line 91: | ||
** http://suda.co.uk/projects/microformats/hcalendar/get-cal.php?uri=http://microformats.org/wiki/value-dt-test-abbr-YYYY-MM-DD--HH-MM%23uf | ** http://suda.co.uk/projects/microformats/hcalendar/get-cal.php?uri=http://microformats.org/wiki/value-dt-test-abbr-YYYY-MM-DD--HH-MM%23uf | ||
** verified by [[User:Tantek]] 2009-07-06. | ** verified by [[User:Tantek]] 2009-07-06. | ||
* 2009-11-04: UfXtract has been updated to pass this test. To re-run and verify this test case try: | |||
** http://ufxtract.com/api/?url=http://microformats.org/wiki/value-dt-test-abbr-YYYY-MM-DD--HH-MM&format=hcalendar&output=text | |||
</div><!--history --> | </div><!--history --> |
Latest revision as of 14:39, 4 November 2009
One of several value class pattern date and time value test cases. Marked up with the Test Fixture poshformats.
- author
testing
The value-dt-test-abbr-YYYY-MM-DD--HH-MM test demonstrate the concatenation of abbr title attribute and the text from a span element to create one datetime value:
Value Class Pattern date and time parsing:
- YYYY-MM-DD in
abbr
elementtitle
attribute, with locale/language-specific contents - HH:MM
in an hCalendar 1.0 event.
markup pattern
Here is the markup pattern fragment (escaped, and with abstract not real values) that is being tested:
<span class="dtstart">
<abbr class="value" title="YYYY-MM-DD">this day of the week</abbr>
at <span class="value">HH:MM</span>
</span>
test
hCalendar 1.0 test in actual markup on the page (view or edit source to see actual hCalendar markup)
The weekly dinner will be on this Tuesday at 18:30
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;CHARSET=utf-8:weekly dinner
DTSTART;VALUE=DATE-TIME:20080624T183000
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:20080624T183000
Acceptable variant:
DTSTART:20080624T183000
Asserts
Test | Result | Comment |
---|---|---|
vevent[0].dtstart | IsEqualToISODate("2008-06-24T18:30") | With the value class pattern the results should contain a time |
results
- 2009-06-26: Brian Suda's X2V has been updated (as of X2V 0.9.3) to pass this test! See Brian Suda's X2V hCalendar-2-iCalendar converter on his site to re-run and verify this test case for yourself. Or use this converter link to produce results from this test case page directly:
- 2009-11-04: UfXtract has been updated to pass this test. To re-run and verify this test case try:
derivation
This test was derived from the example shown in Value Class Pattern.