Created
March 6, 2012 07:11
-
-
Save kistvan/1984521 to your computer and use it in GitHub Desktop.
joda-Time ある期間内で何日分離れているかどうかカウント Days.daysBetween
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateTime start = ... //期間はじまり | |
DateTime end = ... //期間おわり | |
Logger.debug("between:%s", Days.daysBetween(start, end).getDays()); | |
//日付をまたいでも、24時間以上離れていない場合はゼロになる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment