requireDateString()function

requireDateString(value?: PossibleDate, caller: AnyCaller = requireDateString): string
ParamType
valuePossibleDate
Values that can be converted to dates.
callerAnyCaller
Any calling function or constructor, usually referring to something that can call in the current scope that can appear in a stack trace. Defaults to requireDateString
Return
string

Convert a possible Date instance to a local date string like "2015-09-12", or throw RequiredError if it couldn't be converted.