Javascript Date get method

Javascript Date get method used to get particular part of date from Date object 

getDate() method

getDate method return date form Date object  , date value start from 1-31

Example

JavaScript getDay() method

getDay() method return day of wee k in index from 0-6

Week Day
sundaymondaytuesdaywednesdaythursdayfridaysaturday
Index01
23456

Example

JavaScript getMonth() method

getMonth method return index of month from 0 - 11 

Month Name
JanuaryFebuary
March
........December
Index012.......
11

Example

JavaScript getFullYear() method

getFullYear() method return four digit number

Example

JavaScript getHours() method

getHours method return hours from date 0-23

Example

JavaScript getMinutes() method

getMinutes() method return minutes from 0-59

Example

JavaScript getSecond() method

getSecond() method return second from 0-59

Example

JavaScript getMIlisecond() method

getMilliSecond() method return millisecond from 0-999

Example

JavaScript getTime() method

getTime() method return time in millisecond

Example

JavaScript getTimeZoneOffset() method

getTimeZoneOffset() return timezone of your system i.e timezone that set in your system

Example

Related Articals