var beginningTime = moment('1635750314812', 'YYYY/MM/DD'); // Today date
var endTime = moment(undefined, 'YYYY/MM/DD') // Today date
console.log(beginningTime.isSame(endTime)); //expect true
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
I am using moment js to get if 2 date are the same using the above pattern. But now i get false instead of true. How to solve the issue?