List of usage examples for org.joda.time Chronology dayOfWeek
public abstract DateTimeField dayOfWeek();
From source file:ch.oakmountain.tpa.solver.PeriodicalTimeFrame.java
License:Apache License
/** * Gets the field for a specific index in the chronology specified. * <p/>// w w w. j av a 2s . co m * This method must not use any instance variables. * * @param index the index to retrieve * @param chrono the chronology to use * @return the field */ protected DateTimeField getField(int index, Chronology chrono) { switch (index) { case DAY_OF_WEEK: return chrono.dayOfWeek(); case MILLIS_OF_DAY: return chrono.millisOfDay(); default: throw new IndexOutOfBoundsException("Invalid index: " + index); } }