Example usage for org.joda.time.chrono CopticChronology getInstance

List of usage examples for org.joda.time.chrono CopticChronology getInstance

Introduction

In this page you can find the example usage for org.joda.time.chrono CopticChronology getInstance.

Prototype

public static CopticChronology getInstance() 

Source Link

Document

Gets an instance of the CopticChronology in the default time zone.

Usage

From source file:com.jjlharrison.jollyday.util.CalendarUtil.java

License:Apache License

/**
 * Returns a set of gregorian dates within a gregorian year which equal the
 * ethiopian orthodox month and day. Because the ethiopian orthodox year
 * different from the gregorian there may be more than one occurrence of an
 * ethiopian orthodox date in an gregorian year.
 *
 * @param gregorianYear//w w  w  .ja  v  a  2  s .c o m
 *            a int.
 * @return List of gregorian dates for the ethiopian orthodox month/day.
 * @param eoMonth
 *            a int.
 * @param eoDay
 *            a int.
 */
public Set<LocalDate> getEthiopianOrthodoxHolidaysInGregorianYear(int gregorianYear, int eoMonth, int eoDay) {
    return getDatesFromChronologyWithinGregorianYear(eoMonth, eoDay, gregorianYear,
            CopticChronology.getInstance());
}

From source file:org.odk.collect.android.fragments.dialogs.CopticDatePickerDialog.java

License:Apache License

private void setUpDatePicker() {
    LocalDateTime copticDate = DateTimeUtils.skipDaylightSavingGapIfExists(getDate()).toDateTime()
            .withChronology(CopticChronology.getInstance()).toLocalDateTime();
    setUpDayPicker(copticDate.getDayOfMonth(), copticDate.dayOfMonth().getMaximumValue());
    setUpMonthPicker(copticDate.getMonthOfYear(), monthsArray);
    setUpYearPicker(copticDate.getYear(), MIN_SUPPORTED_YEAR, MAX_SUPPORTED_YEAR);
}

From source file:org.odk.collect.android.fragments.dialogs.CopticDatePickerDialog.java

License:Apache License

private LocalDateTime getCurrentCopticDate() {
    int copticDay = getDay();
    int copticMonth = Arrays.asList(monthsArray).indexOf(getMonth());
    int copticYear = getYear();

    LocalDateTime copticDate = new LocalDateTime(copticYear, copticMonth + 1, 1, 0, 0, 0, 0,
            CopticChronology.getInstance());
    if (copticDay > copticDate.dayOfMonth().getMaximumValue()) {
        copticDay = copticDate.dayOfMonth().getMaximumValue();
    }/* w  w  w . j  a va2s.  c o  m*/

    return new LocalDateTime(copticYear, copticMonth + 1, copticDay, 0, 0, 0, 0,
            CopticChronology.getInstance());
}