Jiffy.parseFromList constructor

Jiffy.parseFromList(
  1. List<int> list, {
  2. bool isUtc = false,
})

Constructs a Jiffy instance from a list of integers representing a date and time.

The list parameter should be a list of integers in the following order:

[year, month, day, hour, minute, second, millisecond, microsecond].

At least year should be provided. Any other values that are not provided will default to their minimum value (For example, day and month will default to 1 and, hour, minute, second, millisecond, and microsecond will default to 0 if not provided).

Example usage:

final jiffy = Jiffy.parseFromList([1997, 9, 23]);

Throws a JiffyException if the input list is empty.

Implementation

factory Jiffy.parseFromList(List<int> list, {bool isUtc = false}) {
  return Jiffy._internal(list, isUtc: isUtc);
}