{"action":"created","issue":{"url":"https://api.github.com/repos/date-fns/date-fns/issues/254","repository_url":"https://api.github.com/repos/date-fns/date-fns","labels_url":"https://api.github.com/repos/date-fns/date-fns/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/date-fns/date-fns/issues/254/comments","events_url":"https://api.github.com/repos/date-fns/date-fns/issues/254/events","html_url":"https://github.com/date-fns/date-fns/pull/254","id":189862730,"number":254,"title":"Add distanceInWordsStrict() for simple difference formatting","user":{"login":"STRML","id":1197375,"avatar_url":"https://avatars.githubusercontent.com/u/1197375?v=3","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-16T22:08:06Z","updated_at":"2016-11-22T20:14:13Z","closed_at":"2016-11-22T20:14:07Z","pull_request":{"url":"https://api.github.com/repos/date-fns/date-fns/pulls/254","html_url":"https://github.com/date-fns/date-fns/pull/254","diff_url":"https://github.com/date-fns/date-fns/pull/254.diff","patch_url":"https://github.com/date-fns/date-fns/pull/254.patch"},"body":"This is a simpler version of `distanceInWords` that allows the user to specify advanced options to format the output.\r\n\r\nIt does emit \"fuzzy\" output like \"less than x\", \"about x\", etc.\r\n\r\nSignature:\r\n\r\n```jsx\r\n(\r\n  dateToCompare: Date|string|number,\r\n  date: Date|string|number,\r\n  options?: {\r\n    includeSeconds?: boolean,\r\n    addSuffix?: boolean,\r\n    locale?: Object,\r\n    unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y',\r\n    partialMethod?: 'floor' | 'ceil' | 'round'\r\n  }\r\n) => string\r\n```\r\n\r\nFor example:\r\n\r\n```js\r\n// What is the distance from 1 January 2016\r\n// to 1 January 2015, in minutes?\r\nvar result = distanceInWordsStrict(\r\n  new Date(2016, 0, 1),\r\n  new Date(2015, 0, 1),\r\n  {unit: 'm'}\r\n)\r\n//=> '525600 minutes'\r\n\r\n// What is the distance from 1 January 2016\r\n// to 28 January 2015, in months, rounded up?\r\nvar result = distanceInWordsStrict(\r\n  new Date(2015, 0, 28),\r\n  new Date(2015, 0, 1),\r\n  {unit: 'M', partialMethod: 'ceil'}\r\n)\r\n//=> '1 month'\r\n```\r\n\r\nThis adds `xSeconds`, `xHours`, and `xYears` to locale data. I have edited the `en`, `de`, and `zh-cn` locales, as I know them, but I don't know enough about the rest to confidently edit them."},"comment":{"url":"https://api.github.com/repos/date-fns/date-fns/issues/comments/262352860","html_url":"https://github.com/date-fns/date-fns/pull/254#issuecomment-262352860","issue_url":"https://api.github.com/repos/date-fns/date-fns/issues/254","id":262352860,"user":{"login":"kossnocorp","id":52201,"avatar_url":"https://avatars.githubusercontent.com/u/52201?v=3","gravatar_id":"","url":"https://api.github.com/users/kossnocorp","html_url":"https://github.com/kossnocorp","followers_url":"https://api.github.com/users/kossnocorp/followers","following_url":"https://api.github.com/users/kossnocorp/following{/other_user}","gists_url":"https://api.github.com/users/kossnocorp/gists{/gist_id}","starred_url":"https://api.github.com/users/kossnocorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kossnocorp/subscriptions","organizations_url":"https://api.github.com/users/kossnocorp/orgs","repos_url":"https://api.github.com/users/kossnocorp/repos","events_url":"https://api.github.com/users/kossnocorp/events{/privacy}","received_events_url":"https://api.github.com/users/kossnocorp/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T20:14:13Z","updated_at":"2016-11-22T20:14:13Z","body":"👏 "}}
{"actor":{"display_login":"kossnocorp"}}