Skip to content

Commit

Permalink
Corrected handling of dateModified & datePublished
Browse files Browse the repository at this point in the history
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
tomschr committed May 7, 2024
1 parent cc785f1 commit 331f291
Show file tree
Hide file tree
Showing 2 changed files with 287 additions and 102 deletions.
1 change: 1 addition & 0 deletions suse2022-ns/common/utility.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,5 @@

<xsl:value-of select="$lang-attr"/>
</xsl:template>

</xsl:stylesheet>
Loading

0 comments on commit 331f291

Please sign in to comment.