@ file : Jvm Name (" DL H LocalDate ") Ċ package Ġee . sm mv . dl h . extension Ċ Ċ import Ġjava . time . LocalDate Ċ import Ġkotlin . math . abs Ċ Ċ fun ĠLocalDate . validate Date InRange ( from : ĠInt , Ġto : ĠInt ) Ġ{ Ċ ĉ val Ġfrom Date Ġ= ĠLocalDate . now (). minus Days ( abs ( from . to Long ())) Ċ ĉ val Ġto Date Ġ= ĠLocalDate . now (). plus Days ( to . to Long ()) ĊĊ ĉ if Ġ( from Date . is After ( this )) Ġthrow ĠIllegalArgumentException (" Given Ġdate Ġis Ġmore Ġthan Ġ${ abs ( from )} Ġdays Ġin Ġpast ") Ċ ĉ if Ġ( toDate . is Before ( this )) Ġthrow ĠIllegalArgumentException (" Given Ġdate Ġis Ġmore Ġthan Ġ${ abs ( to )} Ġdays Ġin Ġfuture ") Ċ } Ċ