Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Valid ¶
func Valid(value string, flags ValidFlags) bool
Valid check value to verify whether or not it is a valid iso8601 time representation.
Types ¶
type ValidFlags ¶
type ValidFlags int
ValidFlags is a bitset type used to configure the behavior of the Valid function.
const ( // Strict is a validation flag used to represent a string iso8601 validation // (this is the default). Strict ValidFlags = 0 // AllowSpaceSeparator allows the presence of a space instead of a 'T' as // separator between the date and time. AllowSpaceSeparator ValidFlags = 1 << iota // AllowMissingTime allows the value to contain only a date. AllowMissingTime // AllowMissingSubsecond allows the value to contain only a date and time. AllowMissingSubsecond // AllowMissingTimezone allows the value to be missing the timezone // information. AllowMissingTimezone // AllowNumericTimezone allows the value to represent timezones in their // numeric form. AllowNumericTimezone // Flexible is a combination of all validation flag that allow for // non-strict checking of the input value. Flexible = AllowSpaceSeparator | AllowMissingTime | AllowMissingSubsecond | AllowMissingTimezone | AllowNumericTimezone )
Click to show internal directories.
Click to hide internal directories.