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

stdDate.WeekdayName raises error 13 because return type is Long

Aperta Adatta ai principianti
#169 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Leggi src/WIP/stdDate.cls, concentrandoti sulla proprietà WeekdayName e su come chiama il getter Weekday. Riproduci la discrepanza di tipo in Excel per Windows, quindi verifica che il nome restituito e il giorno della settimana numerico usino il primo giorno richiesto. Il lavoro è completato quando la proprietà restituisce un String e le combinazioni di data e primo giorno indicate corrispondono al risultato di VBA WeekdayName.

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

Descrizione

stdDate.WeekdayName is declared As Long in src/WIP/stdDate.cls, but it assigns VBA.WeekdayName(...), which returns a String. Calling stdDate.CreateFromUnits(2026, 10, 26).WeekdayName(False, vbMonday) raises VBA error 13 (Type mismatch) in a fresh Excel process on Windows.

Minimal correction:

Public Property Get WeekdayName(Optional ByVal Abbreviate As Boolean = False, Optional ByVal FirstDayOfWeek As VbDayOfWeek) As String

I reproduced ERR:13 with the original class. With only the return-type correction, 28 calls over seven dates, Sunday/Monday and full/abbreviated names completed and matched VBA weekday names. This changes the declared public return type from Long to String, matching the intended result.

Correction to my original report (2026-10-30): I also suggested passing FirstDayOfWeek into the Weekday getter and claimed this would fix a weekday-name discrepancy. That claim was not supported. In the current class, If Not FirstDayOfWeek Then uses bitwise Not on the numeric enum, so it overwrites all tested explicit values with the instance default. Moreover the tested name oracle was invariant to a consistent first-day setting. The minimal patch above does not change first-day handling; the guard and numeric Weekday behavior need a separate reproducer and fix.

Lingua principale
VBA
Stelle
412
Fork
70
Merge medio
16h 10m
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 sancarn/stdVBA

Tutte le issue di sancarn/stdVBA

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.