What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-02-13 09:05:25
angular get current date yyyy-mm-dd
import { DatePipe } from '@angular/common'; @Component({ templateUrl: './name.component.html', styleUrls: ['./name.component.scss'], providers: [DatePipe] }) myDate = new Date(); constructor(private datePipe: DatePipe){ this.myDate = thi... Add solution -
Javascript 2022-02-13 05:20:08
how to find the current date and time of a city in js
var loc = '35.731252, 139.730291' // Tokyo expressed as lat,lng tuple var targetDate = new Date() // Current date/time of user computer var timestamp = targetDate.getTime()/1000 + targetDate.getTimezoneOffset() * 60 // Current UTC date/time expressed as s... Add solution -
Html 2022-02-12 07:40:11
clock code html
<!DOCTYPE html> <html> <body> <canvas id="canvas" width="400" height="400" style="background-color:#333"> </canvas> <script> var canvas = document.getElementById("canvas&qu... 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-11 12:50:11
javascript get clock time in auto counter up
<html> <head> <title>(Type a title for your page here)</title> <script type="text/javascript"> function display_c(){ var refresh=1000; // Refresh rate in milli seconds mytime=setTimeout('display_ct()',refresh) } ... Add solution -
Javascript 2022-02-11 03:00:52
jquery time counter
<!-- Display the countdown timer in an element --> <p id="demo"></p> <script> // Set the date we're counting down to var countDownDate = new Date("Jan 5, 2022 15:37:25").getTime(); // Update the count down eve... 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