scinote-web/app/javascript/src/services/helpers/date_time_helper.js

7 lines
173 B
JavaScript
Raw Normal View History

2017-10-06 21:22:01 +08:00
// @flow
export function isToday(inputDate: Date): boolean {
const todaysDate = new Date();
return inputDate.setHours(0, 0, 0, 0) == todaysDate.setHours(0, 0, 0, 0);
}