Date.setMinutes

setMinutes – Set the minutes, according to local time (0–59).

Description

Date.setMinutes(integer minutes)

Parameters

Name Description Type Default Optional
minutes integer No

Return values

Integer. The new timestamp.

Examples

Example #1 – setMinutes example
var date = new Date(2015, 9, 21, 16, 29, 00); console.log(date.getTime()); // 1445437740000 (CEST) // 1445459340000 (EDT) console.log(date.setMinutes(10)); // 1445436600000 (CEST) // 1445458200000 (EDT) console.log(date); // 21 October 2015 16:10:00

External references