Чтобы удалить минуты из даты с помощью Moment.js, вы можете использовать следующие методы:
Метод 1: использование метода startOf
var momentObj = moment(); // Create a Moment.js object with the desired date
momentObj.startOf('hour'); // Set the time to the beginning of the hour
Метод 2: использование метода set
var momentObj = moment(); // Create a Moment.js object with the desired date
momentObj.set('minute', 0); // Set the minute to 0
Метод 3: использование метода subtract
var momentObj = moment(); // Create a Moment.js object with the desired date
momentObj.subtract(momentObj.minute(), 'minutes'); // Subtract the current minutes
Метод 4. Использование метода минуты
var momentObj = moment(); // Create a Moment.js object with the desired date
momentObj.minute(0); // Set the minute to 0
Эти методы обнулят компонент минут объекта Moment.js, фактически удалив минуты.