toLocal method

Period toLocal()

Returns a Period with the start and end in local time.

If this isLocal, it will be returned. If eiher start or end is not in local time, a new Period will be created with the start and end converted to local time.

Implementation

Period toLocal() {
  if (isLocal ?? false) return this;
  return Period(
    start: start.toLocal(),
    end: end.toLocal(),
  );
}