TypeError: date.getHours bukan fungsi

// make sure to call the function on an actual date object!
const date = new Date(dateString);
const hours = date.getHours();
Zwazel