How to check if date is between interval in java? -
          this question has answer here:                               creating java date object year,month,day                                         6 answers                                          i have 6 int  variables: currentmonth , currentday , monthfrom , dayfrom , monthuntil  , dayuntil . need check if todays month , day falls within range of , until variables.   for example if currentmonth = 1 , currentday = 2 , monthfrom = 11 , dayfrom =   24 , monthuntil = 3  , dayuntil = 3  date in interval , method should return true.   i'm not sure how though. there other option check every possible outcome using ifs?          just quick range check calendar:   note: make sure import java.util.gregoriancalendar;   public static boolean isdateinrange(int month, int day,                                     int monthfrom, int dayfrom,                                     int monthuntil, int dayuntil) {     int yearroll = 0;     int currentroll = 0;     if (monthuntil < monthfrom) ...