Microformats test suite

hCard 15 - ISO date format test - W3C Note DateTime profile

This page was design to comprehensively test the W3C Note DateTime profile. The IsEqualToISODate method normalisation and compares dates.

From: hCard test suite 1.0

Author: Glenn Jones

Tests:

Test Result Comment
vcard[0].rev IsEqualToISODate("2007") Should find a date from text node - Year
vcard[1].rev IsEqualToISODate("2007-05") Should find a date from text node - Year and month
vcard[2].rev IsEqualToISODate("2007-05-01") Should find a date from text node - Year, month and day
vcard[3].rev IsEqualToISODate("2007-05-01T21:30") Should find a date from text node - Year, month, day and time
vcard[4].rev IsEqualToISODate("2007-05-01T21:30Z") Should find a date from text node - UTC Year, month, day and time
vcard[5].rev IsEqualToISODate("2007-05-01T21:30:00Z") Should find a date from text node - UTC Year, month, day and time
vcard[6].rev IsEqualToISODate("2007-05-01T21:30+08:00") Should find a date from text node - Year, month, day and time with time zone offset
vcard[7].rev IsEqualToISODate("2007-05-01T21:30:00+08:00") Should find a date from text node - Year, month, day and time with time zone offset
vcard[8].rev IsEqualToISODate("2007-05-01T21:30:00.0150") Should find a date from text node - Year, month, day and time with decimal fraction of a second

History:

Profile - W3C Note DateTime. This is one of the subsets of the ISO 8601 standard use for microformats.

John Doe
Last updated: 2007
John Doe
Last updated: 2007-05
John Doe
Last updated: 2007-05-01
John Doe
Last updated: 2007-05-01T21:30
John Doe
Last updated: 2007-05-01T21:30Z
John Doe
Last updated: 2007-05-01T21:30:00Z
John Doe
Last updated: 2007-05-01T21:30+08:00
John Doe
Last updated: 2007-05-01T21:30:00+08:00
John Doe
Last updated: 2007-05-01T21:30:00.0150

Not vaild date format for microformats profiles. W3C Note DateTime or RFC 3339

John Doe
Last updated: 07-05-01

Some rights reserved