Title: DateHelper.fromNow() returns 11 months instead of 10 for 319 days · Issue #528 · bennadel/JavaScript-Demos · GitHub
Open Graph Title: DateHelper.fromNow() returns 11 months instead of 10 for 319 days · Issue #528 · bennadel/JavaScript-Demos
X Title: DateHelper.fromNow() returns 11 months instead of 10 for 319 days · Issue #528 · bennadel/JavaScript-Demos
Description: The Moment.fromNow() spec says 45 to 319 days | MM | 2 months ago ... 10 months ago implying that a timespan of 319 days should return "10 months ago". The implementation in DateHelper returns "11 months ago" for this. https://github.com...
Open Graph Description: The Moment.fromNow() spec says 45 to 319 days | MM | 2 months ago ... 10 months ago implying that a timespan of 319 days should return "10 months ago". The implementation in DateHelper returns "11 ...
X Description: The Moment.fromNow() spec says 45 to 319 days | MM | 2 months ago ... 10 months ago implying that a timespan of 319 days should return "10 months ago". The implementation in DateHelper re...
Opengraph URL: https://github.com/bennadel/JavaScript-Demos/issues/528
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DateHelper.fromNow() returns 11 months instead of 10 for 319 days","articleBody":"The [`Moment.fromNow()` spec](https://momentjs.com/docs/#/displaying/fromnow/) says \r\n\r\n\u003e 45 to 319 days | MM | 2 months ago ... 10 months ago\r\n\r\nimplying that a timespan of 319 days should return \"10 months ago\".\r\n\r\nThe implementation in DateHelper returns \"11 months ago\" for this.\r\n\r\nhttps://github.com/bennadel/JavaScript-Demos/blob/master/demos/date-helper-angular11/src/app/date-helper.ts#L271\r\n\r\nI was curious if this was a known deviation from the spec?","author":{"url":"https://github.com/GrahamBorland","@type":"Person","name":"GrahamBorland"},"datePublished":"2023-02-08T10:54:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/528/JavaScript-Demos/issues/528"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fbaaddb-d211-f06a-32e2-a93a899b4b2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99D8:1792BE:2F16109:40BE26D:6973CA3F |
| html-safe-nonce | 40ee9700a95a73d269fd10e5840063bc2913920b62e35e08cdbd57beb46dddb0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUQ4OjE3OTJCRToyRjE2MTA5OjQwQkUyNkQ6Njk3M0NBM0YiLCJ2aXNpdG9yX2lkIjoiMjYwMTgzNTc1NzU4MDk2OTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a71194e6caef7b04f4c3709b9cbce56a8371d39d4dd98148302a456bc8efb730 |
| hovercard-subject-tag | issue:1575903079 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bennadel/JavaScript-Demos/528/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d42e995472326c6957f9583f267ac40004235dd04dd106ea3c929e2f184d31d3/bennadel/JavaScript-Demos/issues/528 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d42e995472326c6957f9583f267ac40004235dd04dd106ea3c929e2f184d31d3/bennadel/JavaScript-Demos/issues/528 |
| og:image:alt | The Moment.fromNow() spec says 45 to 319 days | MM | 2 months ago ... 10 months ago implying that a timespan of 319 days should return "10 months ago". The implementation in DateHelper returns "11 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GrahamBorland |
| hostname | github.com |
| expected-hostname | github.com |
| None | cee21c7b1ab632710d33905bc72e5e9e520eab75c9a12e16c2ce9e8f6e031e06 |
| turbo-cache-control | no-preview |
| go-import | github.com/bennadel/JavaScript-Demos git https://github.com/bennadel/JavaScript-Demos.git |
| octolytics-dimension-user_id | 563690 |
| octolytics-dimension-user_login | bennadel |
| octolytics-dimension-repository_id | 11567330 |
| octolytics-dimension-repository_nwo | bennadel/JavaScript-Demos |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11567330 |
| octolytics-dimension-repository_network_root_nwo | bennadel/JavaScript-Demos |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f5f1d4f67b002a74550b90d5c1c0f0899544c742 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width