[Bug]: ISOWEEKNUM returns 53 for late-December dates that belong to week 1 of the next year
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
誤った結果の原因として issue が挙げている DateTimePlugin.ts の isoweeknumCore から始めてください。その動作を、ISOWEEKNUM と WEEKNUM(date, 21) について提示された例および期待値と比較してください。12月下旬に列挙された日付が1を返し、1月1日も引き続き1を返すことが完了条件です。
索引モデルが issue の本文から書いたものです。
説明
Description
ISOWEEKNUM returns 53 for 29-31 December when those days are in ISO week 1 of the following year. For example, 31 December 2024 is a Tuesday in ISO week 2025-W01, so the result should be 1. WEEKNUM(date, 21) has the same problem.
const { HyperFormula } = require('hyperformula')
const hf = HyperFormula.buildFromArray([[
'=ISOWEEKNUM(DATE(2024,12,31))',
'=ISOWEEKNUM(DATE(2019,12,30))',
'=ISOWEEKNUM(DATE(2025,12,29))',
'=WEEKNUM(DATE(2024,12,31),21)',
'=ISOWEEKNUM(DATE(2025,1,1))',
]], { licenseKey: 'gpl-v3' })
console.log(hf.getSheetValues(0)[0])
Actual: [ 53, 53, 53, 53, 1 ]
Expected (Excel, LibreOffice): [ 1, 1, 1, 1, 1 ]
2019, 2024, and 2025 have only 52 ISO weeks, so week 53 does not exist in those years.
Cause: isoweeknumCore in DateTimePlugin.ts only counts weeks from the first Thursday of the date's own calendar year and never checks whether the date is already in week 1 of the following year.
Excel reference: https://support.microsoft.com/en-us/office/isoweeknum-function-1c2d0afe-d25b-4ab1-8894-8d0520e90e0e
Video or screenshots
N/A
Demo
https://gist.github.com/trackoor/f47a7f14de1d5fbe21bebbf2a36afc22
HyperFormula version
3.5.0 (npm), also develop at 5a6eb09
Your framework
None (Node.js)
Your environment
Node.js 26.13.0 on Linux
Credit: https://ucsbplse.github.io/
- 主要言語
- TypeScript
- スター
- 2.8k
- フォーク
- 175
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 21
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
handsontable/hyperformula のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
handsontable/hyperformula#1883 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
handsontable/hyperformula#1882 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
handsontable/hyperformula#1881 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
handsontable/hyperformula#1880 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
handsontable/hyperformula#1879 ·
メンテナーはふだん 1 日以内に返信
handsontable/hyperformula の issue をすべて見る
似ている issue
-
documentation good first issue roadmap
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
resend/react-email#3876 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
siyuan-note/siyuan#21324 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
dmno-dev/varlock#1279 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
himynameisdave/bsky-profanity-counter#59 ·
メンテナーはふだん 1 日以内に返信