What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-12 18:55:03
get time from date 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-09-09 21:17:02
set min date field to current date
// Use Javascript var today = new Date(); var dd = today.getDate(); var mm = today.getMonth()+1; //January is 0 so need to add 1 to make it 1! var yyyy = today.getFullYear(); if(dd<10){ dd='0'+dd } if(mm<10){ mm='0'+mm } today = yyyy+'-'+mm+'... Add solution -
Javascript 2021-09-06 17:51:05
react native get current time
var date = new Date().getDate(); //To get the Current Date var month = new Date().getMonth() + 1; //To get the Current Month var year = new Date().getFullYear(); //To get the Current Year var hours = new Date().getHours(); //To get the Current Hours var m... Add solution -
Javascript 2021-08-30 05:58:03
new date javascript
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