JavaScript Tarih setUTCMinutes()
Örnek
UTC saatine göre dakikayı 17'ye ayarlayın:
const d = new Date();
d.setUTCMinutes(17);
Aşağıda daha fazla "Kendiniz Deneyin" örnekleri.
Tanım ve Kullanım
setUTCMinutes() yöntemi, UTC'ye göre bir tarih nesnesinin dakikalarını ayarlar.
notlar
UTC (Evrensel Saat Koordineli), Dünya Saati Standardı tarafından belirlenen saattir.
UTC saati GMT saati (Greenwich Ortalama Saati) ile aynıdır.
Tarayıcı Desteği
setUTCMinutes()
bir ECMAScript1 (ES1) özelliğidir.
ES1 (JavaScript 1997) tüm tarayıcılarda tam olarak desteklenir:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Sözdizimi
Date.setUTCMinutes(min, sec, millisec)
Parametre Değerleri
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:
|
Teknik detaylar
Geri dönüş değeri: | Bir sayı. Tarih ile 1 Ocak 1970 00:00:00 UTC arasındaki milisaniye sayısı. |
---|
Daha fazla örnek
Örnek
UTC yöntemlerini kullanarak tarih saatini 90 dakika önce olarak ayarlayın:
const d = new Date();
d.setUTCMinutes(d.getUTCMinutes() - 90);