NotePlan / NotePlan/plugins

np.Templating: date.add and subtract and business add API/docs need normalization

Open
#401 2 comments 0 reactions 1 assignee View on GitHub

@mikeerickson is already working on this.

Since Feb 1, 2023.

Dominant language
JavaScript
Stars
204
Forks
82
Avg merge
22h 27m
Merged PRs (30d)
3

Description

See the discussion here

date.add documentation is wrong
but even if the docs were right, the API would not be consistent with businessadd

Documentation:
Screen Cap 2023-02-01 at 09 14 33@2x

Note how pivotDate is in a different location for the two groups below.
Actual code in DateModule.js

  add(userPivotDate = '', value = '', shorthand = 'days', format = '') {
  subtract(userPivotDate = '', value = '', shorthand = 'days', format = '') {

  businessAdd(numDays = 1, pivotDate = '', format = '') {
  businessSubtract(numDays = 1, pivotDate = '', format = '') {

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.