The Date object has some common

Source: Internet
Author: User

The Date object is used to process dates and times.
Date () Returns the day and time.
Dateobject.getdate ();
. GetDate () returns the day of the one month (1 ~ 31) from the Date object.
. GetDay () returns the day of the week (0 ~ 6) from the Date object.
. GetMonth () returns the month (0 ~ 11) from the Date object.
. getFullYear () returns the year as a four-digit number from a Date object.
. GetHours () returns the hour (0 ~ 23) of the Date object.
. getminutes () returns the minute (0 ~ 59) of the Date object.
. Getseconds () returns the number of seconds (0 ~ 59) of the Date object.
. Getmilliseconds () returns the milliseconds (0 ~ 999) of the Date object.
Set the specific time, get variable set.
Dateobject.setfullyear (Year,month,day)
Year required. A four-bit integer that represents the year. expressed in local time.
Month is optional. A numeric value that represents the month, between 0 and 11. expressed in local time.
Day is optional. A value that represents the day of the month, between 1 and 31. expressed in local time.
Dateobject.sethours (HOUR,MIN,SEC,MILLISEC)
Hour required. A value that represents the hour, between 0 (midnight) ~ 23 (11 o'clock), in local time (hereinafter).
Min is optional. A value that represents the minute, between 0 and 59. This parameter is not supported until Emcascript is normalized.
The SEC is optional. Represents the number of seconds between 0 and 59. This parameter is not supported until Emcascript is normalized.
Millisec is optional. A numeric value representing milliseconds between 0 and 999. This parameter is not supported until Emcascript is normalized.

The Date object has some common

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.