Bug 47794

Summary: unreasonable code in org.apache.poi.ss.usermodel.DateUtil
Product: POI Reporter: joachim.rudolph
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: minor CC: joachim.rudolph
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description joachim.rudolph 2009-09-07 11:38:38 UTC
in org.apache.poi.ss.usermodel.DateUtil.daysInPriorYears() you can find the code 

if ((!use1904windowing && yr < 1900) || (use1904windowing && yr < 1900)) {

throw new IllegalArgumentException("'year' must be 1900 or greater");

}


This does not make sense for me, i assume the secong 1900 should be 1904 or otherwise the evaluation of use1904windowing makes no sense.
Comment 1 Dominik Stadler 2015-05-20 18:19:15 UTC
I tried to fix this with r1680642.