Autodesk / Autodesk/hig

Timestamp does not render dates over a year ago

Open
#811 0 comments 0 reactions 0 assignees View on GitHub
community
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.