What do you want to save?
Add Code snippet
New code examples
-
Html 2022-03-07 00:10:10
auto update time in html
timer(); function timer(){ var currentTime = new Date() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() var sec = currentTime.getSeconds() if (minutes < 10){ minutes = "0" + minutes } if (sec < 10){ sec ... Add solution -
Javascript 2022-02-25 03:55:09
javascript format date
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var today = new Date(); console.log(today.toLocaleDateString("en-US")); // 9/17/2016 console.log(today.toLocaleDateString("en-US", options)); // Satur... Add solution -
TypeScript 2022-02-22 21:20:03
mat input datetime-local now
@Component({ selector: 'app', template: `<input type="datetime-local" [value]="date" (change)="date=$event.target.value" /> {{date}}` }) export class AppComponent { date: string; constructor(... Add solution -
Javascript 2022-02-20 03:25:05
js months ago
var d = new Date(); d.setMonth(d.getMonth() - 3); Add solution -