dayjs / dayjs-website

⏰Day.js website repo
http://day.js.org/
MIT License
66 stars 227 forks source link

Update describe to example `.formNow` return value #91

Closed mu-hun closed 1 year ago

mu-hun commented 2 years ago
dayjs.extend(relativeTime)
dayjs('1999-01-01').fromNow() // 20 years ago

If you pass true, you can get the value without the suffix.

dayjs.extend(relativeTime)
dayjs('1999-01-01').fromNow(true) // 22 years

Time from now .fromNow(withoutSuffix?: boolean) - RelativeTime · Day.js

I was confused about the difference between 20 years ago and 22 years 😕

so I fix similar value to 22 years.

iamkun commented 1 year ago

Thanks