Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

numberToSimpleDate returns day 0 for 31 December of some years when leapYear1900 is true

Aperta Adatta ai principianti
#1,793 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Individua la funzione numberToSimpleDate nel codebase di HyperFormula. Il bug si trova nel controllo dell'anno, dove viene confrontato con {year: year - 1, …} invece di {year, …}. Correggi quel confronto, poi esegui le specifiche di date, EDATE, EOMONTH e DAY per verificare che la correzione risolva i 32 anni interessati senza rompere il comportamento esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

With leapYear1900: true, numberToSimpleDate decomposes 31 December of 32 years between 1900 and 2200 (for example 2036 and 2040) as day 0 of January of the next year. =EOMONTH(DATE(2036,12,31),0) returns 31 January 2037, and TEXT of that serial shows 2037-01-00. It happens with and without nullDate 1899-12-31.

The year check in that function compares against {year: year - 1, …} where {year, …} looks intended. Changing it brings the 32 affected years to 0 in both leap configurations, leaves the default configuration unchanged, and the 80 date, EDATE, EOMONTH and DAY specs I ran still pass.

Found while reviewing #1781. That PR doesn't cause it.

Lingua principale
TypeScript
Stelle
2.8k
Fork
174
Merge medio
1g 19h
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di handsontable/hyperformula

Tutte le issue di handsontable/hyperformula

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.