hasZoneOffset property

bool hasZoneOffset

Implementation

bool get hasZoneOffset {
  try {
    /// ZoneOffset could be as:
    /// <time>Z
    /// <time>±hh:mm
    /// <time>±hhmm
    /// <time>±hh
    return date!.toLowerCase().endsWith('z') ||
        date!.contains('-', date!.length - 6) ||
        date!.contains('+', date!.length - 6);
  } catch (e) {
    print(e);
  }
  return false;
}