DateTimeX extension

on

Properties

toTimeOfDay → TimeOfDay

Available on DateTime, provided by the DateTimeX extension

no setter

Methods

format(DateFormat formatter) → String

Available on DateTime, provided by the DateTimeX extension

formatAgo({DateTime? relativeTo}) → String

Available on DateTime, provided by the DateTimeX extension

Formats the DateTime into a relative "time ago" string. Handles "seconds ago", "minutes ago", "yesterday", "days ago", and above a week "YYYY-MM-DD". Also includes "hours ago" to bridge the gap between minutes and yesterday.
formatPattern(String pattern) → String

Available on DateTime, provided by the DateTimeX extension