RelativeTime extension
Adds relative time support.
This plugin includes four methods: from, fromNow, to, toNow. All of them can help you to format date to a relative time string.
- on
Methods
-
from(
Day day, [bool withoutSuffix = false]) → String -
Available on Day, provided by the RelativeTime extension
Returns the string of relative time fromday
. -
fromNow(
[bool withoutSuffix = false]) → String -
Available on Day, provided by the RelativeTime extension
Returns the string of relative time from now. -
to(
Day day, [bool withoutPrefix = false]) → String -
Available on Day, provided by the RelativeTime extension
Returns the string of relative time today
. -
toNow(
[bool withoutPrefix = false]) → String -
Available on Day, provided by the RelativeTime extension
Returns the string of relative time to now.