10-projects-10-hours icon indicating copy to clipboard operation
10-projects-10-hours copied to clipboard

Dynamic new year date

Open OmarAlareeki opened this issue 3 years ago • 1 comments

The string for the new year "1 Jan 2021" is not day dynamic which is not a good idea of coding in JS. I tried it this way: const currentYearEve = "31 Dec " + new Date().getFullYear();

OmarAlareeki avatar Jul 19 '21 21:07 OmarAlareeki

I did that: let endDateInMeliSec = Date.UTC(new Date().getFullYear(), new Date().getMonth() + 2, 5, 22, 44);

Date.UTC is a method that we give it a UTC date and it return for us the number of meliseconds

EL-MEHDI-ESSAADI avatar Jan 05 '22 22:01 EL-MEHDI-ESSAADI