I tried the following commands on the console:
today = new Date()
Mon Jun 11 2018 12:37:12 GMT+0900 (Japan Standard Time)
I could get its hour by
hourNow = today.getHours()
11
As a newbie in JS, I wanna to get acknowledge all today's methods and attributes, so I test:
dir(today)
Mon Jun 11 2018 12:37:12 GMT+0900 (Japan Standard Time)
It does not work as in python,
In [20]: now = datetime.now()
In [21]: dir(now)
Out[21]:
['__add__',...
'astimezone',...
'weekday',
'year']
Is it possible to retrieve the methods and properties of a specified object as reference in a straight-forward way?