जावास्क्रिप्ट दिनांक सेट मिनट्स ()
उदाहरण 1
मिनट को 17 पर सेट करें:
const d = new Date();
d.setMinutes(17);
परिभाषा और उपयोग
setMinutes()
एक तिथि के मिनट सेट करता है।
इस विधि का उपयोग सेकंड और मिलीसेकंड सेट करने के लिए भी किया जा सकता है।
उदाहरण 2
दिनांक समय 90 मिनट पहले सेट करें :
const d = new Date();
d.setMinutes(d.getMinutes() - 90);
ब्राउज़र समर्थन
setMinutes()
एक ECMAScript1 (ES1) सुविधा है।
ES1 (जावास्क्रिप्ट 1997) सभी ब्राउज़रों में पूरी तरह से समर्थित है:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
Date.setMinutes(min, sec, millisec)
पैरामीटर मान
Parameter | Description |
---|---|
min | Required. An integer representing the minutes.
Expected values are 0-59, but other values are allowed:
|
sec | Optional. An integer representing the seconds
Expected values are 0-59, but other values are allowed:
|
millisec | Optional. An integer representing the milliseconds
Expected values are 0-999, but other values are allowed:
|
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | एक संख्या, दिनांक वस्तु और मध्यरात्रि 1 जनवरी 1970 के बीच मिलीसेकंड की संख्या का प्रतिनिधित्व करती है |
---|---|
जावास्क्रिप्ट संस्करण: | ईसीएमएस्क्रिप्ट 1 |