What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-28 07:27:07
js time
// these are the most useful ones IMO var time = new Date(); time.getDate(); // returns value 1-31 for day of the month time.getDay(); //returns value 0-6 for day of the week time.getFullYear(); //returns a 4 digit value for the current year time.getHours... Add solution -
Javascript 2021-10-26 14:08:11
get time in javascript
// these are the most useful ones IMO var time = new Date(); time.getDate(); // returns value 1-31 for day of the month time.getDay(); //returns value 0-6 for day of the week time.getFullYear(); //returns a 4 digit value for the current year time.getHours... Add solution -
Javascript 2021-10-25 15:57:07
javascript get date
var d= new Date(); d.getFullYear();//Get the year as a four digit number (yyyy) d.getMonth();//Get the month as a number (0-11) d.getDate();//Get the day as a number (1-31) d.getHours();//Get the hour (0-23) d.getMinutes();//Get the minute (0-59) d.getSec... Add solution -
Javascript 2021-10-24 23:49:10
js date methods
var d= new Date(); d.getFullYear(); //Get the year as a four digit number (yyyy) d.getMonth(); //Get the month as a number (0-11) d.getDate(); //Get the day as a number (1-31) d.getHours(); //Get the hour (0-23) d.getMinutes(); //Get the minute (0-59) d.g... Add solution -
Html 2021-10-20 14:00:06
display live updating date and time in html
// date part /// var month=x.getMonth()+1; var day=x.getDate(); var year=x.getFullYear(); if (month <10 ){month='0' + month;} if (day <10 ){day='0' + day;} var x3= month+'-'+day+'-'+year; // time part // var hour=x.getHours(); var minute=x.getMinut... Add solution -
Javascript 2021-10-18 04:36:06
new Date() get speicifc hours min sec
new Date().getDate() // Get the day as a number (1-31) new Date().getDay() // Get the weekday as a number (0-6) new Date().getFullYear() // Get the four digit year (yyyy) new Date().getHours() // Get the hour (0-23) new Dat... Add solution -
Javascript 2021-10-13 19:55:04
get current time in javascript
// these are the most useful ones IMO var time = new Date(); time.getDate(); // returns value 1-31 for day of the month time.getDay(); //returns value 0-6 for day of the week time.getFullYear(); //returns a 4 digit value for the current year time.getHours... Add solution -
Other 2021-10-13 10:10:09
Write a JavaScript program to display the current day and time in the following format. Today is : Tuesday. Current time is : 10 PM : 30 : 38
var today = new Date(); var day = today.getDay(); var daylist = ["Sunday","Monday","Tuesday","Wednesday ","Thursday","Friday","Saturday"]; console.log("Today is : " + da... Add solution