We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import dayjs from "dayjs"; var relativeTime = require('dayjs/plugin/relativeTime') dayjs.extend(relativeTime) const timeFrom = dayjs().from(dayjs('2015-01-01'), true) // timeFrom = 6 years
Is there any way to customize the format of relative time? (XX years XX months XX days XX minutes XX seconds)
The text was updated successfully, but these errors were encountered:
https://day.js.org/docs/en/customization/customization
Sorry, something went wrong.
I'm here.
var updateLocale = require('dayjs/plugin/updateLocale') dayjs.extend(updateLocale) dayjs.updateLocale('en', { relativeTime: { yy: "%d years" } })
Almost everything I do results in NaN ... Sry noob here ... I thought I would format this relativeTime object but not getting anywhere with it
You should pass the whole relativeTime config object, not part of it.
relativeTime
No branches or pull requests
Is there any way to customize the format of relative time? (XX years XX months XX days XX minutes XX seconds)
The text was updated successfully, but these errors were encountered: