PDA

View Full Version : Date Parsing



Supial
20 Feb 2012, 7:34 PM
Greetings,
I'm using the Date object in my Ext application, and going through the Ext.Date documention, it states:
that if Ext.Date (http://www.sencha.com/forum/#!/api/Ext.Date) is required and loaded, it will copy all methods / properties to this object for convenience

I'm not seeing this occur and I do have the Ext.Date in my Include statement - ie:


Ext.require(['Ext.Date']);


I'm a bit lost as to what is meant my "loaded"? How do I load the object?

So based on the documentation, if I create an instance of Ext.Date, will all the methods and properties from the standard Date object be available in the Ext.Date?

Any clarification would be great. I'm using 4.0.7.

Cheers

mitchellsimoens
21 Feb 2012, 6:01 AM
Ext.Date is already included in all JS file builds for Ext JS so you do not need to Ext.require it. Ext.Date is an object that we have that allows you to have some methods that aren't on the native Date object or more flexibility. Ext.Date does not apply the native Date Object methods on itself.

Supial
21 Feb 2012, 11:03 AM
Thanks for the note.
I'm a bit confused by what the documention is suggesting then. What methods/properties are copied?

How do I convert then an Ext.Date instance to a standard Date object, or is the Ext.Date not an object, but rather a static list of methods that can be used against the standard Date object?

Thanks

mitchellsimoens
21 Feb 2012, 11:04 AM
Ext.Date usually receives a Date Object like looking at Ext.Date.format, the first argument you send it is the Date Object.