{"action":"closed","issue":{"url":"https://api.github.com/repos/moment/moment/issues/3759","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/3759/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/3759/comments","events_url":"https://api.github.com/repos/moment/moment/issues/3759/events","html_url":"https://github.com/moment/moment/issues/3759","id":207313564,"number":3759,"title":"Duration not returning accurate number of days","user":{"login":"hipwebdesign","id":232201,"avatar_url":"https://avatars.githubusercontent.com/u/232201?v=3","gravatar_id":"","url":"https://api.github.com/users/hipwebdesign","html_url":"https://github.com/hipwebdesign","followers_url":"https://api.github.com/users/hipwebdesign/followers","following_url":"https://api.github.com/users/hipwebdesign/following{/other_user}","gists_url":"https://api.github.com/users/hipwebdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/hipwebdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hipwebdesign/subscriptions","organizations_url":"https://api.github.com/users/hipwebdesign/orgs","repos_url":"https://api.github.com/users/hipwebdesign/repos","events_url":"https://api.github.com/users/hipwebdesign/events{/privacy}","received_events_url":"https://api.github.com/users/hipwebdesign/received_events","type":"User","site_admin":false},"labels":[{"id":39331845,"url":"https://api.github.com/repos/moment/moment/labels/Troubleshooting","name":"Troubleshooting","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-13T19:21:08Z","updated_at":"2017-02-14T23:31:47Z","closed_at":"2017-02-14T23:31:47Z","body":"I find that if I take the Difference between two dates and turn it into a Duration, it returns the correct number of years, months, hours, minutes, and seconds -- but not days. For example:\r\n\r\n```\r\nvar now = moment();\r\nvar future = moment(\"2017-4-17 23:18:30\"); // a future\r\nvar diff = future.diff(now);\r\nvar duration = moment.duration(diff);\r\n\r\nvar dateA = moment(now).add(duration._data);\r\nvar dateB = moment(now).add(duration);\r\n```\r\nIn this example, {dateA} returns ~2 fewer days than {dateB}.\r\n\r\n> Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0\r\n> 2.17.1"}}
{"actor":{"display_login":"icambron"}}