Grammar Documentation for node type "DateTimeRule"
DateTimeRules are rules that apply on values which have the data type "DateTime" from Schema.org.
The specific rule type is given by the value in the "$rule" property. The properties which rules can have are explained in the Meta_Rules.md document. Note that the "subject" property can be omitted, if the "$path" object has an empty JSON Pointer as value (see Meta_Rules.md for details).
However, the data type for the "parameter" depends on the "$rule" value (e.g. arguments for the rule function), and is explained in the following.
equals
The "equals" rule checks if a given DateTime value (the validated value) matches a given DateTime.
The parameter is a DateTime which serves as the second argument for the rule function. The validated subject must be the same as the given parameter.
isBefore
The "isBefore" rule checks if a given DateTime value (the validated value) is chronologically before a given DateTime.
The parameter is a DateTime which serves as the second argument for the rule function. The validated subject must be chronologically before the given parameter.
isAfter
The "isAfter" rule checks if a given DateTime (the validated value) is chronologically after a given DateTime.
The parameter is a DateTime which serves as the second argument for the rule function. The validated subject must be chronologically after the given parameter.
isInSet
The "isInSet" rule checks if a given DateTime (the validated value) is in the given set of allowed values.
The parameter is an array which contains DateTimes, which are valid instances for a given DateTime (the validated subject).
hasYear
The "hasYear" rule checks if a given DateTime (the validated value) has a value for the year, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the year of a given DateTime (the validated subject).
hasMonth
The "hasMonth" rule checks if a given DateTime (the validated value) has a value for the month, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the month of a given DateTime (the validated subject).
hasDay
The "hasDay" rule checks if a given DateTime (the validated value) has a value for the day, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the day of a given DateTime (the validated subject).
hasHour
The "hasHour" rule checks if a given DateTime (the validated value) has a value for the hour, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the hour of a given DateTime (the validated subject).
hasMinutes
The "hasMinutes" rule checks if a given DateTime (the validated value) has a value for the minutes, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the minutes of a given DateTime (the validated subject).
hasSeconds
The "hasSeconds" rule checks if a given DateTime (the validated value) has a value for the seconds, that is conform to a given numeric pattern.
The parameter is a numeric pattern, that has to be matched by the seconds of a given DateTime (the validated subject).
hasTimezone
The "hasTimezone" rule checks if a given DateTime (the validated value) has a value for the timezone, that matches a given value with format: (+|-)hh:mm
The parameter is a timezone string with format (+|-)hh:mm that has to be matched by the timezone of a given DateTime (the validated subject). "Z" or a not defined timezone are handled as a not fulfilled constraint.
Last updated