GetDate Method
Returns the day of the month for the specified date.
grammar
DateObjectName.Getdate ()
DateObjectname is Either the name of a date Object OR a property of an existing object.
method
Date
description
The value returned by getDate is an integer between 1 and 31.
example
The Second Statement Below Assigns The Value 25 To The Variable Day, Based on The Value of The Date Object Xmas95.
Xmas95 = New Date ("December 25, 1995 23:15:00")
Day = xmas95.getdate ()
Relevant
SetDate method
getDay method Returns the day of the week for the specified date. Syntax dateObjectName.getDay () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getDay is an integer corresponding to the day of the week:. zero for Sunday, one for Monday, two for Tuesday, and so on examples The second statement below assigns the value 1 to weekday, based on the value of the date object Xmas95 This is because December 25, 1995. IS a monday. xmas95 = new date ("december 25, 1995 23:15:00")
Weekday = xmas95.getday ()
getHours method Returns the hour for the specified date. Syntax dateObjectName.getHours () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getHours is integer between 0 and 23. Examples of an The Second Statement Below Assigns The Value 23 To The Variable Hours, Based on The Value of The Date Object Xmas95. Xmas95 = New Date ("December 25, 1995 23:15:00")
Hours = xmas95.gethours ()
Related sethours Method
getMinutes method Returns the minutes in the specified date. Syntax dateObjectName.getMinutes () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getMinutes is integer between 0 and 59. Examples of an THE Second Statement Below Assigns The Value 15 To The Variable Minutes, Based on The Value of The Date Object Xmas95. Xmas95 = New Date ("December 25, 1995 23:15:00") Minutes = Xmas95.getminutes ()
Related setminutes method
getMonth method Returns the month in the specified date. Syntax dateObjectName.getMonth () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getMonth is an integer between zero and eleven. Zero corresponds to January, one to February, and so on examples The second statement below assigns the value 11 to the variable month, based on the value of the date object Xmas95 Xmas95 = new Date ( "December 25, 1995 23:15..: 00 ")
Month = xmas95.getdate ()
SetMonth Method
getSeconds method Returns the seconds in the current time. Syntax dateObjectName.getSeconds () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getSeconds is integer between 0 and 59. Examples of an The Second Statement Below Assigns The Value 30 To The Variable Secs, Based = New Date ("December 25, 1995 23:15:30")
SECS = Xmas95.getSeconds ()
Related setseconds method
getTime method Returns the numeric value corresponding to the time for the specified date. Syntax dateObjectName.getTime () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by the getTime method is the number of milliseconds since 1 January 1970 00:00:00. You can use this method to help assign a date and time to another date object. examples The following example assigns the date value of theBigDay to sameAsBigDay. theBigDay = new Date ( "July 1, 1999 ") SameasbigDay = New Date ()
SameasbigDay.settime (thebigday.gettime ())
SETTIME METHOD
getTimezoneOffset method Returns the time zone offset in minutes for the current locale. Syntax dateObjectName.getTimezoneOffset () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The time zone offset is the difference between local time And gmt. Daylight Savings Time prevents this value from being a constant. example x = new date ()
CurrentTimeZoneOffsetInHours = x.gettimezoneoffset () / 60
getYear method Returns the year in the specified date. Syntax dateObjectName.getYear () dateObjectName is either the name of a date object or a property of an existing object. The method described Date The value returned by getYear is the year less 1900. For example, if the year is 1976, the value returned is 76. examples The second statement below assigns the value 95 to the variable year, based on the value of the date object Xmas95 Xmas95 = new Date ( "December 25, 1995 23:15.: 00 ")
Year = xmas95.getyear ()
Related setYear method
go method Loads a URL from the history list syntax history.go (delta | "location").. delta is an integer or a property of an existing object, representing a relative position in the history list location is a string or a property of an existing object, representing all or part of a URL in the history list. method history description The go method navigates to the location in the history list determined by the argument that you specify. interactively display the history list by choosing History from you can the Window menu. Up to 10 items in the history list are also displayed on the Go menu. The delta argument is a positive or negative integer. If delta is greater than zero, the go method loads the URL that is that number of entries forward in the history list;. otherwise, it loads the URL that is that number of entries backward in the history list If delta is 0, Navigator reloads the current page The location argument is a string Use location to load the nearest history entry whose URL.. Contains Locatio n as a substring. The location to URL matching is case-insensitive. Each section of a URL contains different information. See the location object for a description of the URL components. Examples The following button navigates to the nearest history entry that contains the string "home.netscape.com":
The Following Button Navigates To The Url That Is Three Entries Backward In The History List:
OnClick = "History.go (-3)">
Related Back, Forward Methods