ago method

String ago({
  1. String locale = "en",
})

Returns a human-readable relative time string.

Examples:

  • 5 minutes ago
  • 2 days ago

The output language can be customized using locale.

Implementation

String ago({String locale = "en"}) => timeago.format(this, locale: locale);