Example usage for org.joda.time Chronology getDateTimeMillis

List of usage examples for org.joda.time Chronology getDateTimeMillis

Introduction

In this page you can find the example usage for org.joda.time Chronology getDateTimeMillis.

Prototype

public abstract long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay,
        int minuteOfHour, int secondOfMinute, int millisOfSecond);

Source Link

Document

Returns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values.

Usage

From source file:ch.oakmountain.tpa.solver.PeriodicalTimeFrame.java

License:Apache License

/**
 * Constructs an instance set to the specified date and time
 * using the specified chronology, whose zone is ignored.
 * <p/>/*from w  w w  .  j  av a  2s .  co m*/
 * If the chronology is null, <code>ISOChronology</code> is used.
 *
 * @param dayOfWeek      the day of the month, valid values defined by the chronology
 * @param hourOfDay      the hour of the day, valid values defined by the chronology
 * @param minuteOfHour   the minute of the hour, valid values defined by the chronology
 * @param secondOfMinute the second of the minute, valid values defined by the chronology
 * @param millisOfSecond the millisecond of the second, valid values defined by the chronology
 * @param chronology     the chronology, null means ISOChronology in default zone
 */
public PeriodicalTimeFrame(int dayOfWeek, int hourOfDay, int minuteOfHour, int secondOfMinute,
        int millisOfSecond, Chronology chronology) {
    super();
    chronology = DateTimeUtils.getChronology(chronology).withUTC();
    // First of January 1971 was a Monday = UTC week day 1
    long instant = chronology.getDateTimeMillis(1, 1, dayOfWeek, hourOfDay, minuteOfHour, secondOfMinute,
            millisOfSecond);
    iChronology = chronology;
    iLocalMillis = instant;
}