Module

getRelativeDateTime

Get relative date time string e.g. 3 days ago, 3 weeks ago * This function require "Intl.RelativeTimeFormat" in global scope. * Please see polyfill/polyfillIntl if you need a polyfill of that.
Parameters:
Name Type Description
comparedDateTime ISO-timestamp or Date instance
relatedDateTime ISO-timestamp or Date instance
locales The locale code or an array of locale codes

View Source dateTime/getRelativeDateTime.js, line 16