fromNow method
Example when using LocalizationEnUs:
If this is yesterday, will result "a day ago"
If this is tomorrow, will result "in a day"
This will not return precise duration. See MomentLocalization.relativeThreshold for details
Use fromNowPrecise
Implementation
String fromNow({
bool dropPrefixOrSuffix = false,
Abbreviation form = Abbreviation.none,
}) =>
from(
DateTimeConstructors.nowWithTimezone(isUtc),
dropPrefixOrSuffix: dropPrefixOrSuffix,
form: form,
);