Just curious about the reason why the moment object gets modified after calling floor, ceil or round. What if you want to get both floor and ceil of same moment. Do you have to make a deep copy of the moment object ?
Please correct me if I missed something
console.log();
var m1 = moment();
console.log(m1);
m1.floor(10, 'minutes');
console.log(m1);
console.log();
var m2 = moment();
console.log(m2);
m2.ceil(10, 'minutes');
console.log(m2);
Just curious about the reason why the moment object gets modified after calling floor, ceil or round. What if you want to get both floor and ceil of same moment. Do you have to make a deep copy of the moment object ?
Please correct me if I missed something