toShortString method

String toShortString()

Returns the lowercase string name of the unit (e.g., 'minutes').

Implementation

String toShortString() {
  return toString().split('.').last; // e.g. TimeUnit.minutes -> minutes
}