FHIR / FHIR/sushi

Can't assign DateTime with only year component

Open
#1,483 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
188
Forks
64
Avg merge
8d 11h
Merged PRs (30d)
3

Description

Transferred from internal JIRA issue originally created 2023-09-20.

A four-digit number is a valid DateTime, but it matches the NUMBER token, so it doesn’t get assigned correctly:
```
* valueDateTime = 2023
```
When trying to assign a number to a DateTime, check if the raw value of the assignment is a four-digit number. If so, allow it.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the assignment and type-parsing path that handles NUMBER tokens, reproduce `valueDateTime = 2023`, and verify that a four-digit raw value is accepted as a DateTime without breaking numeric assignments.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.