package Ġcom . str v . d un dee Ċ Ċ import Ġcom . str v . d un dee . common . days To Now Ċ import Ġcom . str v . d un dee . common . is Ol der Than Ċ import Ġorg . am sh ove . k lu ent . should Equal Ċ import Ġjava . util . Calendar Ċ import Ġkotlin . test . Test Ċ Ċ class ĠDate UtilsTest Ġ{ ĊĊ ĉ @ Test Ċ ĉ fun Ġdays To Now () Ġ{ Ċĉ ĉ val Ġexpected Diff Ġ= Ġ 3 Ċĉ ĉ val Ġcalendar Ġ= ĠCalendar . getInstance () Ċĉ ĉ calendar . add ( Calendar . DAY _ OF _ YEAR , Ġ- expected Diff ) Ċĉ ĉ val Ġdate Ġ= Ġcalendar . time Ċĉ ĉ date . days To Now () Ġshould Equal Ġexpected Diff Ċ ĉ } ĊĊ ĉ @ Test Ċ ĉ fun Ġis Ol der Than () Ġ{ Ċĉ ĉ val Ġcalendar Ġ= ĠCalendar . getInstance () Ċĉ ĉ calendar . add ( Calendar . DAY _ OF _ YEAR , Ġ- 2 ) Ċĉ ĉ val Ġdate Ġ= Ġcalendar . time Ċĉ ĉ date . is Ol der Than ( Calendar . HOUR , Ġ 2 4 ) Ġshould Equal Ġtrue Ċ ĉ } ĊĊ ĉ @ Test Ċ ĉ fun Ġis Ol der Than 1 () Ġ{ Ċĉ ĉ val Ġcalendar Ġ= ĠCalendar . getInstance () Ċĉ ĉ calendar . add ( Calendar . DAY _ OF _ YEAR , Ġ- 2 ) Ċĉ ĉ val Ġdate Ġ= Ġcalendar . time Ċĉ ĉ date . is Ol der Than ( Calendar . HOUR , Ġ 6 0 ) Ġshould Equal Ġfalse Ċ ĉ } Ċ }