What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-06 19:04:12
javascript 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.g... Add solution -
Javascript 2021-11-05 16:32:13
find year javascript
// Return today's date and time var currentTime = new Date() // returns the month (from 0 to 11) var month = currentTime.getMonth() + 1 // returns the day of the month (from 1 to 31) var day = currentTime.getDate() // returns the year (four digits) var... Add solution -
Other 2021-11-04 23:39:10
Date Validation
/* * source :sfdcmonkey.com * 12/26/2017 */ ({ /*call dateUpdate function on onchange event on date field*/ dateUpdate : function(component, event, helper) { ... Add solution -
Html 2021-11-04 12:15:13
how to make a clock in html/javascript
<!-- This is set automatically to your time zone --> <script> function showTime(){ var date = new Date(); var d = date.getDate(); var d1 = date.getDay(); var h = date.getHours(); // 0 - 23 var m = date.getMinutes();... Add solution -
Javascript 2021-11-04 10:56:10
javascript get date of last monday
let prevMonday = new Date(); prevMonday = new Date(prevMonday.setDate(prevMonday.getDate() - (prevMonday.getDay() + 6) % 7)); // sets the date object to last Monday, if the current day is Monday, // set it to the current date prevMonday = new Date(prevMo... Add solution -
Html 2021-10-28 19:39:08
html set input type date to disable previous dates
$(function(){ var dtToday = new Date(); var month = dtToday.getMonth() + 1; var day = dtToday.getDate(); var year = dtToday.getFullYear(); if(month < 10) month = '0' + month.toString(); if(day < 10) day =... Add solution -
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