Skip to content

Instantly share code, notes, and snippets.

@kistvan
Created March 6, 2012 07:11
Show Gist options
  • Save kistvan/1984521 to your computer and use it in GitHub Desktop.
Save kistvan/1984521 to your computer and use it in GitHub Desktop.
joda-Time ある期間内で何日分離れているかどうかカウント Days.daysBetween
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