Example usage for org.apache.commons.lang3.time DateUtils setMinutes

List of usage examples for org.apache.commons.lang3.time DateUtils setMinutes

Introduction

In this page you can find the example usage for org.apache.commons.lang3.time DateUtils setMinutes.

Prototype

public static Date setMinutes(final Date date, final int amount) 

Source Link

Document

Sets the minute field to a date returning a new object.

Usage

From source file:storybook.toolkit.DateUtil.java

public static Timestamp addTimeFromDate(Date date, Date time) {
    Calendar calTime = Calendar.getInstance();
    calTime.setTime(time);/*from  www . j av a2s.co  m*/
    int h = calTime.get(Calendar.HOUR_OF_DAY);
    int m = calTime.get(Calendar.MINUTE);
    int s = calTime.get(Calendar.SECOND);
    date = DateUtils.setHours(date, h);
    date = DateUtils.setMinutes(date, m);
    date = DateUtils.setSeconds(date, s);
    return new Timestamp(date.getTime());
}

From source file:util.HeatingProperties.java

public static Date checkoutTime(Date day) {
    return DateUtils.setMinutes(DateUtils.setHours(day, 11), 30);
}

From source file:util.HeatingProperties.java

public static Date checkinTime(Date day) {
    return DateUtils.setMinutes(DateUtils.setHours(day, 14), 30);
}