InvalidDateFormatError(pattern)
Source¶
Bases: NumdaplotError
Raised when a custom pattern has no date nor time code, or has a time zone code.
Added in version 0.1.0
Parameters:
-
pattern(str)The rejected pattern.
Attributes:
-
patternThe rejected pattern.
Examples:
import numdaplot as ndp
try:
ndp.CustomDateFormat("%d/%m/%Y %z")
except ndp.InvalidDateFormatError as error:
print(error)
# Expected a pattern with a date or a time code and no time zone code, got '%d/%m/%Y %z'.