Toggle navigation
HOME
plus2net HOME
PHP
HTML
Python
SQL
ASP
jQuery
C
PhotoShop
JavaScript
JavaScript Home
document
window
String
Array
Date & Time
Form Validation
Event handling
Math
basic loop
Date
Submit
Login
×
Login
Username
Password
Login
Contact Us
Questions on JavaScript Date & time
19 : JavaScript date object can be used by
adding a external class
by using an API from the server
built in object available by default
Non of the above
20 : To get the month part from the date object we have to use
MonthToGet()
getMonth()
Month_get()
get_month()
21 : The output of getMonth() for the month of September is
9
8
10
Sep
22 : While using setDate function what will happen if we give a negative number
Generate an error
We will get zero as output
Date will go back starting from 1st day of present month ( minus number )
No output
23 : To get the time part of the date object we have to use
TimeString
toTimeString
convertTime
Time_part
1
▼ More on JavaScript Date
Displaying current date and time
Date object & displaying current date and time on button click
getTime() : Date calculations by using milliseconds that is passed from January 1, 1970
Displaying Current Month using getMonth() function
Displaying present Year using getFullYear()
Showing Current Date using getDate() function
Displaying Current Day using getDay() function
Displaying Current Minutes using getMinutes() function
Displaying Current Hours using getHours() function
getUTCHours: Display UTC hour or GMT Hour
getUTCMinutes: Display UTC minutes or GMT minutes
Displaying Current Second using getSeconds() function
gettimezoneoffset() to get difference in UTC time and local time in minutes
setMinutes: Setting the minutes of a date object to fix value
setHours() Setting the minutes of a date object to fix value
setDate() Setting the date part of the date object
setMonth(): Setting the month part of date object
setFullYear(): Setting the year part of the date object
setMinutes(): Setting the minutes part of the date object
toString():Converting date to string
toLocaleString() Converting to local date string
toDateString() Date to String conversion
toLocaleDateString() Converting to local date string
toTimeString() Converting time part of date object to a string
toUTCString to convert date object to Universal Standard String
Timer function to set time for reminder alert
Timer Resetting the timer function
Recursive timer to trigger a code block after a particular interval
Countdown script displaying days , hours , minutes and seconds left from an event
Displaying changing Clock showing date and time in a web page
Projects using date object
Post your comments , suggestion , error , requirements etc here .
Detail
✖
We use cookies to improve your browsing experience. .
Learn more
HTML
MySQL
PHP
JavaScript
ASP
Photoshop
Articles
FORUM
.
Contact us
©
2000-2023
plus2net.com
All rights reserved worldwide
Privacy Policy
Disclaimer