'how to get the browser time in React [duplicate]
Is there possibility to get the browser time in react. Is there any library that can help with this. The web page should display the time of the browsers( like chrome, explorer firefox etc.)
Thank and Regards, Alexander
Solution 1:[1]
var today = new Date();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
console.log(time)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ayush Gupta |