isequal dayjs
dayjs().isSame(dayjs('2011-01-01')) // default milliseconds
Here is what the above code is Doing:
1. We’re importing the dayjs library.
2. We’re creating a new dayjs object with the current date and time.
3. We’re creating a new dayjs object with the date and time of January 1, 2011.
4. We’re checking if the two dayjs objects are the same.
The output of the above code is:
true