DateOptions class
Options that control date/time parsing.
- Annotations
Constructors
-
DateOptions({String? defaultFormat, String? locale, bool utc = false, bool autoDetectFormat = false, bool useCurrentLocale = false, List<
String> extraAutoDetectPatterns = const []}) -
Creates a new DateOptions.
const
Properties
- autoDetectFormat → bool
-
Enables heuristic parsing to attempt multiple known date formats.
final
- defaultFormat → String?
-
The default DateFormat pattern to use for parsing calendar-style inputs.
final
-
extraAutoDetectPatterns
→ List<
String> -
A list of additional date patterns to attempt when autoDetectFormat is enabled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → String?
-
The locale identifier to use for date parsing when a format is applied.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useCurrentLocale → bool
-
Determines whether to use Intl.getCurrentLocale() as a fallback.
final
- utc → bool
-
Determines whether parsed dates should be converted to UTC.
final
Methods
-
copyWith(
{String? defaultFormat, String? locale, bool? utc, bool? autoDetectFormat, bool? useCurrentLocale, List< String> ? extraAutoDetectPatterns}) → DateOptions - Returns a copy with selected fields replaced.
-
merge(
DateOptions other) → DateOptions -
Returns a new DateOptions that prefers
other's non-null settings. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited