https://github.com/apache/commons-lang
Revision 4f514d5eb3e80703012df9be190ae42d35d25bdc authored by Henri Yandell on 20 December 2006, 06:10:26 UTC, committed by Henri Yandell on 20 December 2006, 06:10:26 UTC
It's looking much better, the only edge case that throws it for a loop is if things start on the 29th of February in a year. I've hacked it in the day mode, but I'm not sure why I had to do that - however I trust the brute force test to be right in day mode. 
In month mode, it's even trickier as to what the correct answer is. How many months between 29th Feb and 28th of Feb the next year? The answer is 11, or with days included it's 11 months and 28 days. I can't see any reason to define that better, so I'm declaring that law. 

Things are weird if you start on Feb 29 :)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@488926 13f79535-47bb-0310-9956-ffa450edef68
1 parent 381ed0c
History
Tip revision: 4f514d5eb3e80703012df9be190ae42d35d25bdc authored by Henri Yandell on 20 December 2006, 06:10:26 UTC
More tests, more bugfixes (aka rewrite of the guts).
Tip revision: 4f514d5
File Mode Size
src
xdocs
LICENSE.txt -rw-r--r-- 11.1 KB
NOTICE.txt -rw-r--r-- 181 bytes
PROPOSAL.html -rw-r--r-- 3.0 KB
RELEASE-NOTES.txt -rw-r--r-- 5.2 KB
STATUS.html -rw-r--r-- 9.5 KB
build.xml -rw-r--r-- 8.5 KB
checkstyle.xml -rw-r--r-- 1.6 KB
default.properties -rw-r--r-- 2.6 KB
doap_lang.rdf -rw-r--r-- 1.9 KB
maven.xml -rw-r--r-- 1.9 KB
pom.xml -rw-r--r-- 11.8 KB
project.properties -rw-r--r-- 2.5 KB
project.xml -rw-r--r-- 14.1 KB

back to top