Doug Mahugh:
> David,
>
> I've finished testing and concluded that the VBA sample I had provided does indeed match Excel's behavior in all cases.
That's excellent news. The Ruby story is interesting, but I don't think we need
to worry about it for now.
> So we can proceed on the basis that we know what Excel is doing, and your Python sample and my VBA sample both mirror Excel's actual YEARFRAC implementation accurately.
That _should_ be true. Of course, it's possible that none of the test cases exercise
a difference, though that seems improbable.
What I did is turn the Python code into an English spec, which SHOULD be the same. There's a risk that this dropped something important, of course. Care to take a look at the "Basis" section's English text and confirm that the definition is correct (at least for YEARFRAC, but really, we want it correct period)?
One oddity: The Excel code has special "Mode=3" handling that is quite odd - is that just dead code, or is it important for something?
--- David A. Wheeler