Timestamp does not render dates over a year ago
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
### Issue:
The `` component does not function with dates that are greater than 12 months old.
#### Example:
```javascript
let birthday = new Date('11:34 AM 04/Apr/1979');
```
#### Result:
> undefined ago
#### Expected result:
> 39 years ago
#### Area of code concerned:
https://github.com/Autodesk/hig/blob/8b9cd2b29d8f2e7b922e4a0e88c79daec74d9701/packages/vanilla/src/basics/timestamp/timestamp.js#L12
Contributor guide
Research direction
Start in packages/vanilla/src/basics/timestamp/timestamp.js at the linked line and reproduce the example with a date more than 12 months old. Trace how the component selects its elapsed-time wording, then verify that the example renders “39 years ago” rather than “undefined ago”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100