The problem sits in a handful of lines. The code checks whether the year falls below 1000, then prepends a single zero. That padding—meant to cover historical dates like the founding of the Tang Dynasty—fails at anything before 1000 AD. Caesar Augustus died in year 14, which becomes "014" instead of "0014". The application never used such dates anyway. Later code reformatted through built-in date types, so the special logic served no actual purpose. Hungarian notation adds to the obscurity; the vnt prefix remains unexplained throughout the codebase.

historical-date.vb
mnYear% = CInt(Year(vntDate))
If mnYear% < 1000 Then
msYear$ = "0" & Trim$(CStr(mnYear%))
Else
msYear$ = Trim$(CStr(mnYear%))
End If