InseeFr / InseeFr/Trevas-TS

Date arithmetic - Adding a Date and a number

Open
#127 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Some date arithmetics are [already implemented](https://inseefr.github.io/Trevas-JS/storybook/?path=/story/interpretor-arithmetic-dates--minus) in Trevas JS.

In the case of subtraction between two dates, the return type is an integer (eg seconds).

We would like to implement addition and subtraction between a date and a number with another date as the return type.

For example, with a DATE variable of `2023-09-29`, we would like the resulting behavior:

`DATE + 3` → `2023-10-02`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.