Preface
The introduction of this article covers the following sections:
1. What does the time standard mean? What are the concepts, associations, and differences between UCT and GMT?
2. What are the criteria for time presentation?
3. JS time in
Date and Time objects
1. Introduce
Date object that is the object of the action date and time. A Date object can operate on dates and times only through methods.
2. Constructor function
2.1 New Date (): Returns the current local date and
The Date object is an internal data type of JavaScript.The Date object has no properties that can be read and written directly, and all access to date and time values is performed through its methods.Date and time of day returned by date ()GetDate ()
The ABS method returns the absolute value of a number.
The ACOs method returns the arc cosine of a number.
The anchor method adds an HTML anchor with the name attribute at both ends of the specified text of the object.
The asin method returns the
The ABS method returns the absolute value of a number.
The ACOs method returns the arc cosine of a number.
The anchor method adds an HTML anchor with the name attribute at both ends of the specified text of the object.
The asin method returns the
Common JavaScript objects and javascript objectsCommon objects, attributes, and usage:(1). Array objectArray objects are used to store multiple values in a single variable.Syntax for creating an Array object:New Array ();New Array (size );New Array (
The Date object is used to process dates and times.To create the syntax for a Date object:
The code is as follows
Copy Code
var mydate=new Date ()
The Date object automatically saves the current date and time
Jsdate blood sorting, jsdate blood sortingThe JS Date object is used to process the Date and time.Syntax for creating a Date object:Var myDate = new Date ()The Date object automatically saves the current Date and time as its initial value.
The
Js time zone functions:
Set datename to a created Date object
================================Datename. getTimezoneOffset ()-- Get the difference between the local time and GMT time (Greenwich Mean Time). The return value is in minutes.==============
Js Date sortingThe JS Date object is used to process the Date and time.Syntax for creating a Date object:Var myDate = new Date ()The Date object automatically saves the current Date and time as its initial value.
The following five parameters are
JavaScript objectsAll things in JavaScript are objects: strings, numbers, arrays, functions ...In addition, JavaScript allows custom objects to be customized.All things are objectsJavaScript provides multiple built-in objects, such as String, Date,
JS Time zone function:Set Datename to a Date object created====================Datename.gettimezoneoffset ()--Gets the difference between local time and GMT time (GMT) and returns the value in minutes====================For example: Obtain GMT time
One, JavaScript is the Object-oriented programming language
Encapsulation: the ability to store relevant information, whether data or method, in an object
Aggregation: The ability to store an object within another object
Inheritance: The ability
The JS Date object is used to process the Date and time.Syntax for creating a Date object:Var myDate = new Date ()The Date object automatically saves the current Date and time as its initial value.The following five parameters are supported:Copy
Date is the date and time creation function in js. Next I will introduce the usage of the date function, and then introduce in detail the example of date comparison and date Regular Expression in the application, I hope this article will bring you
Self-practice, by the way to share a piece of JS native code.The Date object is used to process dates and times.Date () Returns the day and time.GetDate () returns one day of one months (1 ~ 31) from the Date object.Getday () returns one day of the
Displays the current time and countdown Based on javascript.
Self-practice: By the way, I will share with you a piece of js native code.The Date object is used to process the Date and time.Date () returns the Date and time of the current day.GetDate
Js time zone functions:Set datename to a created Date object================================Datename. getTimezoneOffset ()-- Get the difference between the local time and GMT time (Greenwich Mean Time). The return value is in minutes.================
Knowledge point:
It is mainly used for date objects. (The following content is from the Network)
Syntax for creating a date object:VaR mydate = new date ()The date object automatically saves the current date and time as its initial
String object: Handles all string operationsMath object: Handling all mathematical operationsDate object: Handling the storage, conversion, and expression of dates and timesArray object: Provides a model of an array, storing large amounts of ordered
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.