Get and Set method in Date object : Introduction « Date « JavaScript Tutorial

Home
JavaScript Tutorial
1.Language Basics
2.Operators
3.Statement
4.Development
5.Number Data Type
6.String
7.Function
8.Global
9.Math
10.Form
11.Array
12.Date
13.Dialogs
14.Document
15.Event
16.Location
17.Navigator
18.Screen
19.Window
20.History
21.HTML Tags
22.Style
23.DOM Node
24.Drag Drop
25.Object Oriented
26.Regular Expressions
27.XML
28.GUI Components
29.Dojo toolkit
30.jQuery
31.Animation
32.MS JScript
JavaScript Tutorial » Date » Introduction 
12.1.1.Get and Set method in Date object

The Date object represents all aspects of a date and time from year to milliseconds.

getDate()Returns the day of the month.
getDay()Returns the day of the week.
getFullYear()Returns the year in local time with four digits.
getHours()Returns the hour.
getMilliseconds()Returns the milliseconds.
getMinutes()Returns the minutes.
getMonth()Returns the month.
getSeconds()Returns the seconds.
getTime()Returns the date and time in milliseconds.
getTimezoneOffset()Returns the time zone offset from GMT in minutes.
getUTCDate()Returns the day of the month converted to universal time.
getUTCDay()Returns the day of the week converted to universal time.
getUTCFullYear()Returns four-digit representation of the year converted to universal time.
getUTCHours()Return the hour converted to universal time.
getUTCMilliseconds()Returns the milliseconds converted to universal time.
getUTCMinutes()Returns the minutes converted to universal time.
getUTCMonth()Returns the month converted to universal time.
getUTCSeconds()Returns the seconds converted to universal time.
getYear()Returns the year as either four-digits or two-digits.
parse()Converts a string, representing a date and time, into milliseconds.
setDate()Sets the day of the month.
setFullYear()Sets year as a four-digit number.
setHours()Sets the hour.
setMilliseconds()Sets the milliseconds.
setMinutes()Sets the minutes.
setMonth()Sets the month.
setSeconds()Sets the seconds.
setTime()Sets the date and time from a millisecond representation of a date and time.
setUTCdate()Sets the day of the month in universal time.
setUTCFullYear()Sets the year as a four-digit number in universal time.
setUTCHours()Sets the hour in universal time.
setUTCMilliseconds()Sets the milliseconds in universal time.
setUTCMinutes()Sets the minutes in universal time.
setUTCMonth()Sets the month in universal time.
setUTCSeconds()Sets the seconds in universal time.
setYear()Sets the year as either a four-digit number or a two-digit number.
toGMTString()Return the data and time as a string in universal time (GMT).
toLocalString()Return the date and time as a string in local time format.
toSource()Return the source of the Date object.
toString()Return the date and time as a string in local time.
toUTCString()Return the data and time as a string in universal time (GMT).
UTC()Convert a universal date and time (GMT) to milliseconds.


12.1.Introduction
12.1.1.Get and Set method in Date object
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.