Example usage for org.joda.time.base AbstractDateTime getDayOfWeek

List of usage examples for org.joda.time.base AbstractDateTime getDayOfWeek

Introduction

In this page you can find the example usage for org.joda.time.base AbstractDateTime getDayOfWeek.

Prototype

public int getDayOfWeek() 

Source Link

Document

Get the day of week field value.

Usage

From source file:org.powertac.common.Rate.java

License:Apache License

/**
 * Sets the day of the week on which this Rate comes into effect. The
 * {@code begin} parameter is processed to extract the dayOfWeek field.
 *///from w  w  w. j  a  va  2 s  .  co m
public Rate withWeeklyBegin(AbstractDateTime begin) {
    if (null == begin) {
        log.error("Null value for weeklyBegin");
        weeklyBegin = NO_TIME;
        return null;
    }
    return withWeeklyBegin(begin.getDayOfWeek());
}

From source file:org.powertac.common.Rate.java

License:Apache License

/**
 * Sets the weekly end of applicability for this Rate,
 * by processing end spec to extract dayOfWeek field.
 *//*from   ww  w.  j av  a 2s.c o  m*/
public Rate withWeeklyEnd(AbstractDateTime end) {
    if (null == end) {
        log.error("Null value for weeklyEnd");
        weeklyEnd = NO_TIME;
    }
    return withWeeklyEnd(end.getDayOfWeek());
}