You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I use RelativeTime plugin with BadMutable plugin in my react project, I get wrong answer.
For Example: The time variable gets in infinity years instead of 4 months ago.
importReactfrom'react';importdayjsfrom'dayjs';importrelativeTimefrom'dayjs/plugin/relativeTime';importbadMutablefrom'dayjs'/plugin/badMutable';dayjs.extend(relativeTime);dayjs.extend(badMutable);constApp=()=>{// 1588262400000 stands for 2020-05-1consttime=dayjs(newDate(1588262400000)).fromNow();return<div>{time}</div>}
Expected behavior
As above, the time variable should be 4 months ago.
Information
Day.js Version: 1.8.34
OS: MAC
Browser: Chrome 83
Time zone: 2020-08-22 China Beijing
The text was updated successfully, but these errors were encountered:
Describe the bug
When I use RelativeTime plugin with BadMutable plugin in my react project, I get wrong answer.
For Example: The time variable gets
in infinity years
instead of4 months ago
.Expected behavior
As above, the time variable should be
4 months ago
.Information
The text was updated successfully, but these errors were encountered: