dmtrKovalenko / dmtrKovalenko/date-io

generic add/subtract methods?

Open
#667 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
754
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Given that we already have `(add/subtract)Days, Weeks, etc.` functions for every available `Unit`, is there a reason we don't define a generic `add/subtract` function that allows the called to pass in the unit dynamically?
```ts
add( value: TDate, unit: Unit, count: number )
subtract( value: TDate, unit: Unit, count: number )
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.