timeBetween static method

String timeBetween(
  1. DateTime a,
  2. DateTime b
)

Returns a human readable string of the time between 2 DateTimes ex: '1 minute ago' or 'in 2 days'

Implementation

static String timeBetween(DateTime a, DateTime b) =>
    Jiffy.parseFromDateTime(a).from(Jiffy.parseFromDateTime(b));