- java.lang.Object
-
- com.aoapps.tldparser.Dates
-
public class Dates extends Object
TLD files may provide dates within special comments inside the XML.<!-- dateCreated = "ISO 8601" -->:getCreated()<!-- datePublished = "ISO 8601" -->:getPublished()<!-- dateModified = "ISO 8601" -->:getModified()<!-- dateReviewed = "ISO 8601" -->:getReviewed()
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DatesfromComments(Element elem, Dates defaultDates)Parses dates from within direct child comments of the given element.DateTimegetCreated()DateTimegetModified()DateTimegetPublished()DateTimegetReviewed()This has no equivalent in https://schema.org/, however we feel it is important to actively review content to ensure its accuracy, even when it has not been modified.static DatesvalueOf(DateTime created, DateTime published, DateTime modified, DateTime reviewed)
-
-
-
Field Detail
-
UNKNOWN
public static final Dates UNKNOWN
A constant for a set of unknown dates.
-
-
Method Detail
-
valueOf
public static Dates valueOf(DateTime created, DateTime published, DateTime modified, DateTime reviewed)
-
fromComments
public static Dates fromComments(Element elem, Dates defaultDates)
Parses dates from within direct child comments of the given element.- Parameters:
elem- The element to find direct child comments ofdefaultDates- The optional default dates for when no date-comments found
-
getCreated
public DateTime getCreated()
-
getPublished
public DateTime getPublished()
-
getModified
public DateTime getModified()
-
getReviewed
public DateTime getReviewed()
This has no equivalent in https://schema.org/, however we feel it is important to actively review content to ensure its accuracy, even when it has not been modified.
-
-