JScript Method-getUTCMonth method

Source: Internet
Author: User
Js|jscript returns the month value expressed in global standard Time (UTC) in the Date object.

Dateobj.getutcmonth ()

The required option Dateobj parameter is a Date object.

Description
To get the month that is represented by local time, use the GetMonth method.

The getUTCMonth method returns an integer between 0 and 11 that represents the month value in the Date object. The returned value is not equal to the customary
To represent the number of months. Instead, it is 1 smaller than the usual number of months. If the value saved in a Date object is "5, 1996
08:47:00.0 ", then getUTCMonth will return 0.

Example
The following example illustrates the use of the getUTCMonth method.

function Utcdatedemo () {
var d, s = "Today UTC date is:";
D = new Date ();
S + + (D.getutcmonth () + 1) + "/";
S + + d.getutcdate () + "/";
S + + d.getutcfullyear ();
return (s);
}
Requirements
Version 3


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.