1 package org.kuali.student.core.bo.util; 2 3 import org.kuali.rice.kns.bo.InactivateableFromTo; 4 5 public class InactivatableFromToHelper { 6 7 public static boolean isActive(InactivateableFromTo bo) { 8 long asOfDate; 9 10 if (bo.getActiveAsOfDate() != null) { 11 asOfDate = bo.getActiveAsOfDate().getTime(); 12 } 13 else { 14 asOfDate = System.currentTimeMillis(); 15 } 16 17 return (bo.getActiveFromDate() == null || asOfDate >= bo.getActiveFromDate().getTime()) 18 && (bo.getActiveToDate() == null || asOfDate < bo.getActiveToDate().getTime()); 19 } 20 }