FN-YEARFRAC-001: On basis 1 the fictitious 1900-02-29 is not a leap day, and YEARFRAC takes serial 0 as a date
Quirk · measured · recorded 2026-11-04
Excel's calendar holds a 29 February 1900, serial 60, that never existed. On basis 1 (actual/actual) it does not make 1900 a leap year: YEARFRAC(59,60,1) is 1/365, where the real 1904-02-29 gives YEARFRAC(1520,1521,1) = 1/366. Serial 0 is accepted as a date: YEARFRAC(0,5,0) is 5/360 and YEARFRAC(0,60,1) is 60/365. Reversed dates give the same answer as in order. ACCRINTM, DISC, INTRATE, PRICEDISC and RECEIVED take the same 365 and 366 on those dates: DISC(59,60,99,100,1) is about 3.65 and DISC(1520,1521,99,100,1) about 3.66.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
YEARFRAC(59, 60, 1)cell-value2 | start_date: 590x404d800000000000end_date: 600x404e000000000000basis: 10x3ff0000000000000 | 0.00273972602739726030x3f66719f3601671a | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
YEARFRAC(1520, 1521, 1)cell-value2 | start_date: 15200x4097c00000000000end_date: 15210x4097c40000000000basis: 10x3ff0000000000000 | 0.002732240437158470x3f6661ec6a5122f9 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
YEARFRAC(0, 5, 0)cell-value2 | start_date: 00x0000000000000000end_date: 50x4014000000000000basis: 00x0000000000000000 | 0.0138888888888888880x3f8c71c71c71c71c | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
YEARFRAC(0, 60, 1)cell-value2 | start_date: 00x0000000000000000end_date: 600x404e000000000000basis: 10x3ff0000000000000 | 0.16438356164383560x3fc50a8542a150a8 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
DISC(59, 60, 99, 100, 1)cell-value2 | settlement: 590x404d800000000000maturity: 600x404e000000000000pr: 990x4058c00000000000redemption: 1000x4059000000000000basis: 10x3ff0000000000000 | 3.6500000000000030x400d33333333333a | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
DISC(1520, 1521, 99, 100, 1)cell-value2 | settlement: 15200x4097c00000000000maturity: 15210x4097c40000000000pr: 990x4058c00000000000redemption: 1000x4059000000000000basis: 10x3ff0000000000000 | 3.66000000000000330x400d47ae147ae14f | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
Basis: 19 YEARFRAC readings around serial 60 and the 1904, 2000 and 2004 leap days, 35 readings with serial 0 on all five bases, and 3 readings each from five financial functions.
Open: An argument left empty in the call, as in YEARFRAC(,5), has not been read.
Evidence and capture sources
- DnaCalc · crates/calc-func/src/ported/day_count_common.rs c4c5dde7e2dcf735d2849835fc49769e2ab67ba7 · the leap-day test as implemented
- DnaCalc · apps/dna-onecalc/tests/acceptance.rs 2d0eddcac86413014643af81d646581d54ba57bc · delivered_scalar_readings_follow_the_application_route recorded answers pinned
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · 87 recorded readings
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-YEARFRAC-fictitious-leap-day-3
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-YEARFRAC-fictitious-leap-day-9
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-YEARFRAC-calendar-zero-11
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-YEARFRAC-fictitious-leap-day-1
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/DISC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-DISC-fictitious-leap-day-1
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/DISC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-DISC-fictitious-leap-day-2