Operator '<' cannot be applied to types '() => number' and 'number'.

Hi! Maybe a simple question. I’m not familiarized with JS, so i found this on the web: javascript . info/date trying to modify a text field according to current time and date. The problem comes when I try to compare the result obtained by getHours. Shouldn’t that be a number primitive date? What’s the difference between ‘() => number’ and ‘number’?

The code:

 let today = new Date();
 let todayDate = today.getDate
 let todayMonth = today.getMonth;
 let todayHour = today.getHours;

    if(todayHour < 8) {
        $w('#text142').text = "Test";

Trying the parseInt method doesn’t work.

Any help will be very appreciated. Thanks!