Date Summary A class for representing dates and times. Description System.Date is a class used for representing dates and times. Time values are relative to 1 January, 1970 00:00:00:00. Compatibility with JavaScript The implementation-dependent method, Date.parse, was removed as its behavior was not clearly defined until ECMAScript 5. Examples Instantiation 123import System; System.Date d = new System.Date(); Get Current Timestamp 123import System; Date d = new Date(); Methods compareCompares the Date object to another Date object. Date (Constructor)Constructs a System.Date object. getDateReturns the day of the month of the System.Date object according to local time. getDayReturns the day of the week of the System.Date object according to local time. In order to maintain compatibility with ECMAScript, this method does not return a System.Date.Weekday enumeration value. A cast isavailable from the return value of getDay() to the`System. getDayOfMonthReturns the day of the month of the System.Date object according to local time. getFullYearReturns the year of the System.Date object, according to localtime, in a human-readable format. getHoursReturns the hour of the System.Date object according to local time. getMillisecondsReturns the milliseconds of the System.Date object according to local time. getMinutesReturns the minute of the System.Date object according to local time. getMonthReturns the month of the System.Date object according to local time. getSecondsReturns the seconds of the System.Date object according to local time. getTimeReturns the time value in milliseconds. getTimezoneOffsetReturns the timezone offset in minutes from the host computer to Coordinated Universal Time (UTC). getUTCDateReturns the day of the month of the System.Date object according to Coordinated Universal Time (UTC). getUTCDayReturns the day of the week of the System.Date object according to Coordinated Universal Time (UTC). In order to maintain compatibility with ECMAScript, this method does not return a System.Date.Weekday enumeration value. A cast isavailable from the return value of getUTCDay() to the`System. getUTCDayOfMonthReturns the day of the month of the System.Date object according to Coordinated Universal Time (UTC). getUTCFullYearReturns the year of the System.Date object, according toCoordinated Universal Time (UTC), in a human-readable format. getUTCHoursReturns the hour of the System.Date object according to Coordinated Universal Time (UTC). getUTCMillisecondsReturns the milliseconds of the System.Date object according to Coordinated Universal Time (UTC). getUTCMinutesReturns the minute of the System.Date object according to Coordinated Universal Time (UTC). getUTCMonthReturns the month of the System.Date object according to Coordinated Universal Time (UTC). getUTCSecondsReturns the seconds of the System.Date object according to Coordinated Universal Time (UTC). getUTCWeekdayReturns the day of the week of the System.Date object according to Coordinated Universal Time (UTC). In order to maintain API consistency and compatibility withECMAScript, this method does not return a System.Date.Weekday enumeration value just as with `System. getWeekdayReturns the day of the week of the System.Date object according to local time. In order to maintain API consistency and compatibility withECMAScript, this method does not return a System.Date.Weekday enumeration value just as with `System.Date. MonthAn enumeration representing the months of the year. setDateSets the day of the month for the System.Date object according to local time. setDayOfMonthSets the day of the month for the System.Date object according to local time. setFullYearSets the year of the System.Date object according to local time. setHoursSets the hours of the System.Date object according to local time. setMillisecondsSets the milliseconds of the System.Date object according to local time. setMinutesSets the minutes of the System.Date object according to local time. setMonthSets the month of the year for the System.Date object. setSecondsSets the seconds of the System.Date object according to local time. setTimeSets the time value of the System.Date object. setUTCDateSets the day of the month for the System.Date object according to Coordinated Universal Time (UTC). setUTCDayOfMonthSets the day of the month for the System.Date object according to Coordinated Universal Time (UTC). setUTCFullYearSets the year of the System.Date object according to Coordinated Universal Time (UTC). setUTCHoursSets the hours of the System.Date object according to local time. setUTCMillisecondsSets the milliseconds of the System.Date object according to Coordinated Universal Time (UTC). setUTCMinutesSets the minutes of the System.Date object according to Coordinated Universal Time (UTC). setUTCMonthSets the month of the year for the System.Date object according to Coordinated Universal Time (UTC). setUTCSecondsSets the seconds of the System.Date object according to Coordinated Universal Time (UTC). toExternalConstructs a new external Date object with the value of the internal Date object. toStringReturns a string representation of the current date/time value held by the System.Date object. The string representation is guaranteed to be in the following format: Thu Jul 01 2017 00:00:00 UTC-0700. UTCReturns the number of milliseconds elapsed since 1 January, 1970 00:00:00:00 in Coordinated Universal Time (UTC). WeekdayAn enumeration representing the days of the week. Share HTML | BBCode | Direct Link