filmov
tv
JavaScript Date Object Getter Methods | JavaScript Date Functions - JavaScript Tutorial 85

Показать описание
Notes for You:: JavaScript Date object Getter Methods:
- 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();
=========================================
Follow the link for next video:
JavaScript Tutorial 86 - How to create Strings in JavaScript | JavaScript Strings
Follow the link for previous video:
JavaScript Tutorial 84 - How to Display Dates in different formats in JavaScript
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
- 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();
=========================================
Follow the link for next video:
JavaScript Tutorial 86 - How to create Strings in JavaScript | JavaScript Strings
Follow the link for previous video:
JavaScript Tutorial 84 - How to Display Dates in different formats in JavaScript
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
Комментарии