timeZoneLocalize property
String?
timeZoneLocalize
The o:time-zone-localize
option.
only available for scale plans.
Implementation
String? get timeZoneLocalize => _timeZoneLocalize;
The o:time-zone-localize
option.
format: HH:mm
, hh:mmaa
- eg. 13:00
, 1:00pm
throws FormatException if the format is incorrect.
throws InvalidPlanException if the plan is not a scale plan.
Implementation
set timeZoneLocalize(String? value) {
if (plan != PlanType.scale) {
throw InvalidPlanException(
'o:time-zone-localize is only available for scale plans');
}
//check format
if (value != null) {
if (!RegExp(r'^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$').hasMatch(value) &&
!RegExp(r'^([0-1]?[0-9]|2[0-3]):[0-5][0-9][ap]m$').hasMatch(value)) {
throw FormatException(
'timeZoneLocalize must be in the format HH:mm or hh:mmaa', value);
}
}
_timeZoneLocalize = value;
}