julia> Dates.validargs
validargs (generic function with 3 methods)
help?> Dates.validargs
validargs(::Type{<:TimeType}, args...) -> Union{ArgumentError, Nothing}
Determine whether the given arguments consitute valid inputs for the given type. Returns either an ArgumentError, or nothing in case of success.
But this is incidental, the example just demonstrates optional arguments, and the line checking them could be removed.