Improved user.isOutOfOffice() if begin is today.

This commit is contained in:
Martin Edenhofer 2017-09-08 10:53:16 +02:00
parent 80f669d8eb
commit 4c3814b204

View file

@ -119,6 +119,7 @@ class App.User extends App.Model
start_time = new Date(Date.parse(start_time)) start_time = new Date(Date.parse(start_time))
end_time = new Date(Date.parse(end_time)) end_time = new Date(Date.parse(end_time))
now = new Date((new Date).toDateString()) now = new Date((new Date).toDateString())
now.setDate(now.getDate() + 1)
if start_time <= now && end_time >= now if start_time <= now && end_time >= now
return true return true
false false