biosDateFormat top-level property

DateFormat get biosDateFormat

Definition of DateFormat that indicate release date of BIOS.

Implementation

DateFormat get biosDateFormat => _biosDateFormat;
set biosDateFormat (DateFormat newDateFormat)

Apply newDateFormat that for parsing BIOS date into DateTime.

The eligable newDateFormat must be DateFormat.dateOnly. If it returns false, it throws FormatException.

Implementation

set biosDateFormat(DateFormat newDateFormat) {
  if (!newDateFormat.dateOnly) {
    throw FormatException(
        "The date format can only exist year, month and date only.",
        newDateFormat);
  }

  // Parse deep copied DateFormat to ensure no state changes after applied.
  _biosDateFormat = DateFormat(newDateFormat.pattern);
}