Skip to content
New issue

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

Inconsistent behavior of dayjs.max and dayjs.min #1269

Open
alexandropavlov opened this issue Dec 10, 2020 · 1 comment
Open

Inconsistent behavior of dayjs.max and dayjs.min #1269

alexandropavlov opened this issue Dec 10, 2020 · 1 comment

Comments

@alexandropavlov
Copy link

alexandropavlov commented Dec 10, 2020

Describe the bug

const dates = [dayjs()];

dayjs.max(...dates); // == null
dayjs.max(dates); // == date

And the same for dayjs.min.
I think it's weird that it returns different values for different types of arguments passing

Expected behavior
I think it shoud return datejs instance in both cases

Information

  • Day.js Version 1.8.28
  • OS: MacOS
  • Browser chrome 87
@iamkun
Copy link
Owner

iamkun commented Dec 11, 2020

Maybe relate to
#1061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants