{"comment":{"url":"https://api.github.com/repos/isimonov/keep/comments/14743864","html_url":"https://github.com/isimonov/keep/commit/9190c253a7e354c22afbfa4a58386677ba522e0d#commitcomment-14743864","id":14743864,"user":{"login":"tsamu","id":11299475,"avatar_url":"https://avatars.githubusercontent.com/u/11299475?v=3","gravatar_id":"","url":"https://api.github.com/users/tsamu","html_url":"https://github.com/tsamu","followers_url":"https://api.github.com/users/tsamu/followers","following_url":"https://api.github.com/users/tsamu/following{/other_user}","gists_url":"https://api.github.com/users/tsamu/gists{/gist_id}","starred_url":"https://api.github.com/users/tsamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsamu/subscriptions","organizations_url":"https://api.github.com/users/tsamu/orgs","repos_url":"https://api.github.com/users/tsamu/repos","events_url":"https://api.github.com/users/tsamu/events{/privacy}","received_events_url":"https://api.github.com/users/tsamu/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"9190c253a7e354c22afbfa4a58386677ba522e0d","created_at":"2015-12-02T19:01:08Z","updated_at":"2015-12-02T19:01:08Z","body":"For proper usage of 'Today' button\r\n\r\nscope.select = function( date ) {\r\n        if (date === 'today') {\r\n          var today = new Date();\r\n          if (angular.isDate(ngModel.$modelValue)) {\r\n            date = new Date(ngModel.$modelValue);\r\n            date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());\r\n          } else {\r\n            ~~date = new Date(today.setHours(0, 0, 0, 0));~~\r\n            date = new Date(today.setUTCHours(0, 0, 0, 0));\r\n          }\r\n        }\r\n        scope.dateSelection( date );\r\n      };\r\n"}}