NotePlan / NotePlan/plugins

DataStore.calendarNoteByDate(..., 'quarter') returns wrong quarter

Open
#523 0 comments 0 reactions 1 assignee View on GitHub

@EduardMe is already working on this.

Since Jan 27, 2024.

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

Description

From manual checks, DataStore.calendarNoteByDate(today, 'quarter') returns wrong note on last day of quarter.

I've done some eye-ball checks from the extra logs, as you requested, @EduardMe.
So far these appear to have problems:

JSLog: [calendarNoteByDate] with date = 2023-09-30 23:00:00 +0000 / 20231001, timeframe = quarter, calculated filename = 2023-Q4.md
JSLog: [calendarNoteByDate] with date = 2024-03-31 23:00:00 +0000 / 20240401, timeframe = quarter, calculated filename = 2024-Q2.md

These calls for quarters almost certainly come from my call:

const currentQuarterlyNote = DataStore.calendarNoteByDate(today, 'quarter')

These checks were done in GMT, so no timezone offset to worry about.

Originally reported here in Discord.

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.