Skip to content

Global Helpers

distanceOfTimeInWords()

distanceOfTimeInWords() — returns string

Available in: controller, model, mapper, migrator, migration, tabledefinition Category: Date Functions

Pass in two dates to this method, and it will return a string describing the difference between them.

NameTypeRequiredDefaultDescription
fromTimedateyesDate to compare from.
toTimedateyesDate to compare to.
includeSecondsbooleannofalseWhether or not to include the number of seconds in the returned string.