What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-18 01:35:04
javascript work out age from date of birth
function getAge(dateString) { var today = new Date(); var birthDate = new Date(dateString); var age = today.getFullYear() - birthDate.getFullYear(); var m = today.getMonth() - birthDate.getMonth(); if (m < 0 || (m === 0 && ... Add solution -
Javascript 2022-03-02 12:05:02
how make date object in jquery from custom date
var formattedDate = new Date("yourUnformattedOriginalDate"); var d = formattedDate.getDate(); var m = formattedDate.getMonth(); m += 1; // JavaScript months are 0-11 var y = formattedDate.getFullYear(); $("#txtDate").val(d + ".... Add solution -
Javascript 2022-02-12 05:10:02
date 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 2022-02-03 04:26:12
javascript get 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 2022-02-02 12:35:16
what is Date.now() 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.... Add solution -
Javascript 2022-01-31 14:01:21
get all mondays in calendar+js
function sundaysInMonth( m, y ) { var days = new Date( y,m,0 ).getDate(); var sundays = [ 8 - (new Date( m +'/01/'+ y ).getDay()) ]; for ( var i = sundays[0] + 7; i < days; i += 7 ) { sundays.push( i ); } return sundays; } alert( sundays... Add solution
Best helpers
Moonlight
+5
Jared Johns
+5
Iammrigank
+5
Franklinm
+5
Brilliand
+5
Alan Huang
+5
ElHaix
+5
Mcwumbly
+5
Kos
+5
Rgb66rgb
+5
Saphryn
+5
Brett
+5
Brauner
+5
Dani Pop
+5
Jjr
+5
Haim770
+5
Armstrongest
+5
Mae
+5
Csamson
+5
Elarrow
+5
John Weisz
+5
Ryan Zell17
+5
Jinzal
+5
Goldname
+5
Lim Kean An
+5
JAPPAN KAUR
+5