ago property

DateTime get ago

Returns a DateTime that is this duration before now.

const Duration(hours: 2).ago // DateTime 2 hours ago

Implementation

DateTime get ago => DateTime.now().subtract(this);