The Ext.date in ExtJS

Source: Internet
Author: User

Gets the current date directly with the new date ()

Ext.date English API Http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Date

Ext.date is a singleton class that encapsulates a series of date manipulation functions, extending the functionality of JavaScript date, with some common features listed below.

Ext.Date.add (date, interval, value) increases or decreases the time for date, which does not change the value of the original Date object, but instead returns a new Date object.

Ext.Date.between (date, start, end) determines whether the date is between start and end.

Ext.Date.clearTime (date, clone) sets the time of date to 00 hours, 00 minutes, 00 seconds, 000 milliseconds.

Ext.Date.clone (date) clones a copy of the date.

Ext.Date.format (date, format) formats the date and returns the formatted string.

Ext.Date.getDayOfYear (date) Gets the date that is the day ordinal of the year.

Ext.Date.getDaysInMonth (date) Gets the date that is the day ordinal of the month.

Ext.Date.getFirstDateOfMonth (date) Gets the first day of the month in which the date is.

Ext.Date.getFirstDayOfMonth (date) Gets the week of the first day of the month in which the date is.

Ext.Date.getLastDateOfMonth (date) Gets the last day of the month in which date is located.

Ext.Date.getLastDayOfMonth (date) Gets the week of the last day of the month in which the date is.

Ext.Date.getWeekOfYear (date) Gets the number of weeks in the year in which the date is.

Ext.Date.isLeapYear (date) the year in which the date is in leap years.

Ext.Date.now () returns the number of milliseconds for the current time to January 1, 1970. There are already date.now () implementations of the same functionality in Chrome, IE9, and Ie10.

Ext.Date.parse (input, format, strict) creates a date based on the input string, and Date.parse () has a similar function.

The Ext.date in ExtJS

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.