Obtenha tempo a partir da data
var d = new Date(); // for now
d.getHours(); // => 9
d.getMinutes(); // => 30
d.getSeconds(); // => 51
Dentetsu
var d = new Date(); // for now
d.getHours(); // => 9
d.getMinutes(); // => 30
d.getSeconds(); // => 51
const handleTime = (dataD) => {
let data= new Date(dataD)
let hrs = data.getHours()
let mins = data.getMinutes()
if(hrs<=9)
hrs = '0' + hrs
if(mins<10)
mins = '0' + mins
const postTime= hrs + ':' + mins
return postTime
}
var d=new Date();
d.getTime();//I'm in milliseconds, divide by 1000 for seconds