Tutorialsteacher

Follow Us

Articles
  • C#
  • C# OOP
  • ASP.NET Core
  • ASP.NET MVC
  • LINQ
  • Inversion of Control (IoC)
  • Web API
  • JavaScript
  • TypeScript
  • jQuery
  • Angular 11
  • Node.js
  • D3.js
  • Sass
  • Python
  • Go lang
  • HTTPS (SSL)
  • Regex
  • SQL
  • SQL Server
  • PostgreSQL
  • MongoDB
  • JavaScript - Get Started
  • What is JavaScript
  • Setup JavaScript Dev Environment
  • HTML <script> Tag
  • JavaScript - Syntax
  • JavaScript - Popup Message
  • JavaScript - Variables
  • JavaScript - Operators
  • JavaScript - Data Types
  • JavaScript - String
  • JavaScript - Numbers
  • JavaScript - Boolean
  • JavaScript - Object
  • JavaScript - Date
  • JavaScript - Date Methods
  • JavaScript - Array
  • JavaScript - Array Methods
  • JavaScript - null and undefined
  • JavaScript - Function
  • JavaScript - if condition
  • JavaScript - switch
  • JavaScript - for loop
  • JavaScript - while loop
  • JavaScript - Scope
  • JavaScript - eval
  • JavaScript - Error Handling
  • JavaScript - strict mode
  • JavaScript - Hoisting
  • Define JS Class
  • JS Object In Depth
  • this Keyword
  • new Keyword
  • Prototype
  • Inheritance
  • Closure
  • IIFE
Entity Framework Extensions - Boost EF Core 9
  Bulk Insert
  Bulk Delete
  Bulk Update
  Bulk Merge

Date Methods Reference

The following table lists all the get methods of Date object.

MethodDescription
getDate()Returns numeric day (1 - 31) of the specified date.
getDay()Returns the day of the week (0 - 6) for the specified date.
getFullYear()Returns four digit year of the specified date.
getHours()Returns the hour (0 - 23) in the specified date.
getMilliseconds()Returns the milliseconds (0 - 999) in the specified date.
getMinutes()Returns the minutes (0 - 59) in the specified date.
getMonth()Returns the month (0 - 11) in the specified date.
getSeconds()Returns the seconds (0 - 59) in the specified date.
getTime()Returns the milliseconds as number since January 1, 1970, 00:00:00 UTC.
getTimezoneOffset()Returns the time zone offset in minutes for the current locale.
getUTCDate()Returns the day (1 - 31) of the month of the specified date as per UTC time zone.
getUTCDay()Returns the day (0 - 6) of the week of the specified date as per UTC timezone.
getUTCFullYear()Returns the four digits year of the specified date as per UTC time zone.
getUTCHours()Returns the hours (0 - 23) of the specified date as per UTC time zone.
getUTCMilliseconds()Returns the milliseconds (0 - 999) of the specified date as per UTC time zone.
getUTCMinutes()Returns the minutes (0 - 59) of the specified date as per UTC time zone.
getUTCMonth()Returns the month (0 - 11) of the specified date as per UTC time zone.
getUTCSeconds()Returns the seconds (0 - 59) of the specified date as per UTC time zone.
getYear()Returns the no of years of the specified date since 1990. This method is Deprecated

The following table lists all the set methods of Date object.

MethodDescription
setDate()Sets the day as number in the date object.
setFullYear()Sets the four digit full year as number in the date object. Optionally set month and date.
setHours()Sets the hours as number in the date object. Optionally set minutes, seconds and milliseconds.
setMilliseconds()Sets the milliseconds as number in the date object.
setMinutes()Sets the minutes as number in the date object. Optionally set seconds & milliseconds.
setMonth()Sets the month as number in the date object. Optionally set date.
setSeconds()Sets the seconds as number in the date object. Optionally set milliseconds.
setTime()Sets the time as number in the Date object since January 1, 1970, 00:00:00 UTC.
setUTCDate()Sets the day in the date object as per UTC time zone.
setUTCFullYear()Sets the full year in the date object as per UTC time zone
setUTCHours()Sets the hour in the date object as per UTC time zone
setUTCMilliseconds()Sets the milliseconds in the date object as per UTC time zone
setUTCMinutes()Sets the minutes in the date object as per UTC time zone
setUTCMonth()Sets the month in the date object as per UTC time zone
setUTCSeconds()Sets the seconds in the date object as per UTC time zone
setYear()Sets the year in the date object. This method is Deprecated
toDateString()Returns the date segment from the specified date, excludes time.
toGMTString()Returns a date string in GMT time zone.
toLocaleDateString()Returns the date segment of the specified date using the current locale.
toLocaleFormat()Returns a date string in default format.
toLocaleString()Returns a date string using a current locale format.
toLocaleTimeString()Returns the time segment of the specified Date as a string.
toString()Returns a string for the specified Date object.
toTimeString()Returns the time segment as a string from the specified date object.
toUTCString()Returns a string as per UTC time zone.
valueOf()Returns the primitive value of a Date object.
TUTORIALSTEACHER.COM

TutorialsTeacher.com is your authoritative source for comprehensive technologies tutorials, tailored to guide you through mastering various web and other technologies through a step-by-step approach.

Our content helps you to learn technologies easily and quickly for learners of all levels. By accessing this platform, you acknowledge that you have reviewed and consented to abide by our Terms of Use and Privacy Policy, designed to safeguard your experience and privacy rights.

[email protected]

ABOUT USTERMS OF USEPRIVACY POLICY
copywrite-symbol

2024 TutorialsTeacher.com. (v 1.2) All Rights Reserved.