JavaScript Date Functions - JavaScript Tutorial 85

Published: 27 March 2018
on channel: ChidresTechTutorials
2,127
50

Notes for You:: JavaScript Date Functions - JavaScript Tutorial 85
Getter methods are used to get components of date object

getDay():Number
Returns the day of the week (Sunday=0, Saturday=6) in local time.

getMonth():Number
Returns the month (January=0, December=11) in local time.

getDate():Number
Returns the day of the month (1 to 31) in local time.

getFullYear():Number
Returns the full year (a four-digit number) in local time.

getHours():Number
Returns the hour (an integer from 0 to 23) in local time.

getMinutes():Number
Returns the minutes (an integer from 0 to 59) in local time.

getSeconds():Number
Returns the seconds (an integer from 0 to 59) in local time.

getMilliseconds():Number
Returns the milliseconds (an integer from 0 to 999) in local time.


Example Code:
How to get components of date object in locale time.

var dateObject = new Date();
document.write(dateObject.toString());
document.write(dateObject.getDay());
document.write(dateObject.getMonth());
document.write(dateObject.getDate());
document.write(dateObject.getFullYear());
document.write(dateObject.getHours());
document.write(dateObject.getMinutes());
document.write(dateObject.getSeconds());
document.write(dateObject.getMilliseconds());


=========================================

Follow the link for next video:
JavaScript Tutorial 86 - How to create Strings in JavaScript | JavaScript Strings
   • JavaScript String Object - JavaScript...  

Follow the link for previous video:
JavaScript Tutorial 84 - How to Display Dates in different formats in JavaScript
   • How to display Date & Time in JavaScr...  

=========================================

JavaScript Tutorials Playlist:-
   • JavaScript Tutorials  

=========================================
Watch My Other Useful Tutorials:-

jQuery Tutorials Playlist:-
   • jQuery Tutorials  

jQuery UI Tutorials Playlist:-
   • jQuery UI Tutorials  

Bootstrap Tutorials Playlist:-
   • Bootstrap4 Tutorials  

=========================================

► Subscribe to our YouTube channel:
   / chidrestechtutorials  

► Visit our Website:
https://www.chidrestechtutorials.com

=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial


On this page of the site you can watch the video online JavaScript Date Functions - JavaScript Tutorial 85 with a duration of hours minute second in good quality, which was uploaded by the user ChidresTechTutorials 27 March 2018, share the link with friends and acquaintances, this video has already been watched 2,127 times on youtube and it was liked by 50 viewers. Enjoy your viewing!