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
Describe the bug create a dayjs value from null and compare it with current dayjs value:
const currentDate = dayjs(); const expiresOn = dayjs(null);
Check difference for available units:
const diffDays = expiresOn.diff(currentDate, "days"); // NaN const diffInWeeks = expiresOn.diff(currentDate, "week"); // NaN const diffMonths = expiresOn.diff(currentDate, "month"); // 0 const diffInQuaters = expiresOn.diff(currentDate, "quarter"); // 0 const diffInYears = expiresOn.diff(currentDate, "year"); // 0 const diffInHours = expiresOn.diff(currentDate, "hour"); // NaN const diffInMinutes = expiresOn.diff(currentDate, "minute"); // NaN const diffInSeconds = expiresOn.diff(currentDate, "second"); // NaN
Expected behavior return value should be NaN for all units
Information
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
create a dayjs value from null and compare it with current dayjs value:
Check difference for available units:
Expected behavior
return value should be NaN for all units
Information
The text was updated successfully, but these errors were encountered: