Example usage for com.liferay.portal.kernel.util CalendarUtil beforeByDay

List of usage examples for com.liferay.portal.kernel.util CalendarUtil beforeByDay

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util CalendarUtil beforeByDay.

Prototype

public static boolean beforeByDay(Date date1, Date date2) 

Source Link

Usage

From source file:com.liferay.portlet.shopping.model.impl.ShoppingCouponImpl.java

License:Open Source License

public boolean hasValidStartDate() {
    Date now = new Date();

    if (CalendarUtil.beforeByDay(now, getStartDate())) {
        return false;
    } else {//from   w  w  w.  ja v a  2s .c  o  m
        return true;
    }
}

From source file:com.vportal.portlet.vcms.service.impl.VcmsLoggerServiceImpl.java

License:Open Source License

public void removeLogs(Date from, Date to) throws PortalException, SystemException, RemoteException {

    if (!CalendarUtil.beforeByDay(from, to)) {
        return;//from   w ww. j av a2  s  .co  m
    }

    vcmsLoggerFinder.removeByPeriod(from, to);
}