Year support for "10000"

Open
#123 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
d3, javascript
Domain
backend

Research direction

The issue points to format.parse in d3.js and the check if (i != string.length) return null;. Start by reading that parser and its tests for year parsing. Determine whether a five digit year can be parsed without breaking existing formats, and add coverage for year 10000; done when that input parses successfully or the project documents the restriction.

Written by the indexing model from the issue text.

Description

In the file-"d3.js", Method-"format.parse" and line-if (i != string.length) return null;
Year is supported only till "9999"(string.length=14) if year "10000" is passed then it is returning as null because length will be increased by 1(string.length=15).
Is it a technical restriction or is there any other way forward to handle such scenarios ?

Dominant language
JavaScript
Stars
338
Forks
100
Avg merge
6h 20m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from d3/d3-time-format

All issues in d3/d3-time-format

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.