Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected handling of dateModified & datePublished
Fix DOCTEAM#1367 * Combine separate json-ld-dateModified and json-ld-datePublished into json-ld-dateModified-and-Published Produce only an entry, if dates are valid and if datePublished < dateModified Use first revhistory/revision/date for dateModified and last revhistory/revision/date for datePublished. * Revamp santize-date(date) template date can be any date in the format YYYY-M, YYYY-MM, YYYY-M-D, YYYY-MM-D, or YYYY-MM-DD. If the date doesn't conform to any of these formats, an empty string is returned * Add new validate-date(date) template $date should be in the format of YYYY-MM-DDTHH:MMZ, but only the YYYY-MM-DD is checked. If the date is valid, true() is return, otherwise false() * Add compare-dates(date1, date2) Compare two dates lexicographically. Return -1 if date1 < date2; 0 if date1 == date2; 1 if date1 > date2
- Loading branch information