toJson method

String toJson()
override

Returns a JSON serialization for this instance.

Implementation

String toJson() {
  return json.encode({
    "year": _fourDigits(year),
    "month": _twoDigits(month),
    "date": _twoDigits(day),
    "hour": _twoDigits(hour),
    "min": _twoDigits(minute),
    "sec": _twoDigits(second),
    "ms": _threeDigits(millisecond),
  });
}