Flash as Details Date time and date object

Source: Internet
Author: User

VaR now: Date = new date ();
VaR hour = now. gethours ();
VaR minute = now. getminutes ();
VaR second = now. getseconds ();
// Obtain the time, minute, and second of the system.

 

 

-Getdate: Get the current date (number of the current month)
-Getday: Get the day of the week (0-Sunday, 1-Monday ...)
-Getfullyear: Get the current year (four digits)
-Gethours: Get the current hour (in 24-hour format, 0-23)
-Getmilliseconds: Get the current number of milliseconds
-Getminutes: Get the current number of minutes
-Getmonth: Get the current month (Note: 0-Jan, 1-feb ...)
-Getseconds: Get the current number of seconds
-Gettime: the number of seconds since, January 1, in UTC format.
-Gettimezoneoffset: Get the offset value of the current time and UTC format (in minutes)
-Getutcdate: Get the current date in UTC format (number of the current month)
-Getutcday: the day of the week in UTC format (0-Sunday, 1-Monday ...)
-Getutcfullyear: Get the current year in UTC format (four digits)
-Getutchours: Get the current hour in UTC format (in 24-hour format, 0-23)
-Getutcmilliseconds: Get the current number of milliseconds in UTC format
-Getutcminutes: Get the current number of minutes in UTC format
-Getutcmonth: Get the current month in UTC format (Note: Starting from 0: 0-Jan, 1-feb ...)
-Getutcseconds: Get the current number of seconds in UTC format
-Getyear: Get the current abbreviation year (current year minus 1900)
-New Date: Create a date and time object
-Setdate: set the current date (number of the current month)
-Setfullyear: set the current year (four digits)
-Sethours: set the current hour (in 24-hour format, 0-23)
-Setmilliseconds: set the current number of milliseconds
-Setminutes: set the current number of minutes
-Setmonth: set the current month (Note: 0-Jan, 1-feb ...)
-Setseconds: set the current number of seconds.
-Settime: set the number of seconds since, January 1, in UTC format.
-Setutcdate: set the current date in UTC format (number of the current month)
-Setutcfullyear: set the current year in UTC format (four digits)
-Setutchours: set the current hour in UTC format (in 24-hour format, 0-23)
-Setutcmilliseconds: set the current number of milliseconds in UTC format
-Setutcminutes: set the current number of minutes in UTC format
-Setutcmonth: set the current month in UTC format (Note: Starting from 0: 0-Jan, 1-feb ...)
-Setutcseconds: set the current number of seconds in UTC format
-Setyear: set the current abbreviation year (current year minus 1900)
-Tostring: converts a datetime value to a string value in the form of "date/time ".
-Return the fixed time value of the specified UTC format date and time.

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.