Date class:
(1) Construction method
var ndate=new Date ()
var ndate=new date (value)//value is the time difference from date to January 1, 1970
The Var ndate=new date (y,m,d,h,m,s,ms)//y can be a two-digit representation of 19, which can be 4 bits for a specific year, M is zero-based, and D represents a date of 1-31. H is (0-23).
(2) The method
static method: Date.now () DATE.UTC () Date.parse ()
General method: Getxx () gets a value for a property.
GetDate ()//returns the date of the specified Date object based on local time, which is the number of the month
GetDay ()//Returns a few days of the week based on the number of weeks that the specified Date object is returned locally.
GetMonth ()
JSON class
Static methods
(1) json.stringify (value.[ Replace],[space])//value is a complex data type that will be serialized as a JSON string.
This method is to convert a complex data type to a JSON string, which is actually called the Tojson () method in the JS type, which cannot be converted if the type does not define the method. The types that have been defined are:
The Boolean String Date number is deleted for Object and the Array is replaced with null. Some of these characters are escaped. "\ b F n T and so on
Replace: Is the role of data filtering and data conversion, replacing values in value with replace, or filtering out some properties through replace.
Space: is the JSON format control plus white space character.
(2) Json.parse (Text[,revicer])
is to convert the JSON format data to JavaScript data in reverse order. The final return is an object or an array.
Where text is data in JSON format, Revicer is the result of filtering and conversion. The function is called on each object member from the back to the previous order.
If the function returns a value, the value of the member is replaced.
If it returns itself, it will not change
If the return is undefined or null, then the object member is deleted.
JavaScript Basics-Built-in classes