toString method

  1. @override
String toString()
override

Default string representation: Gregorian(YYYY, MM, DD). use formatter for custom formatting.

Implementation

@override
String toString() {
  return 'Gregorian($year, $month, $day)';
}