In Chrome you can do:
date = new Date();
and then in the console you can do:
hour:date.getHours();
What is this called? Where else does it work?
I saw this in the follow code:
showDateTimePicker(date, callback) {
date = date || new Date();
var options = {
...this.props,
year:date.getFullYear(),
month:date.getMonth(),
day:date.getDate(),
hour:date.getHours(),
minute:date.getMinutes()
};
RCTDateTimePicker.showDateTimePicker(options, function (year, month, day, hour, minute) {
date.setFullYear(year);
date.setMonth(month);
date.setDate(day);
date.setHours(hour);
date.setMinutes(minute);
callback(date);
});
}