Example usage for org.joda.time LocalDateTime getDayOfMonth

List of usage examples for org.joda.time LocalDateTime getDayOfMonth

Introduction

In this page you can find the example usage for org.joda.time LocalDateTime getDayOfMonth.

Prototype

public int getDayOfMonth() 

Source Link

Document

Get the day of month field value.

Usage

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

License:Apache License

@Override
protected void updateDays() {
    LocalDateTime localDateTime = getCurrentCopticDate();
    setUpDayPicker(localDateTime.getDayOfMonth(), localDateTime.dayOfMonth().getMaximumValue());
}

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.EthiopianDatePickerDialog.java

License:Apache License

@Override
protected void updateDays() {
    LocalDateTime localDateTime = getCurrentEthiopianDate();
    setUpDayPicker(localDateTime.getDayOfMonth(), localDateTime.dayOfMonth().getMaximumValue());
}

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

License:Apache License

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

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

License:Apache License

@Override
protected void updateDays() {
    LocalDateTime localDateTime = getCurrentIslamicDate();
    setUpDayPicker(localDateTime.getDayOfMonth(), localDateTime.dayOfMonth().getMaximumValue());
}

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

License:Apache License

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

From source file:org.pidome.server.services.macros.Macro.java

License:Apache License

/**
 * Returns the last occurrence of the actions taken.
 * @return // w  w  w. j  ava  2 s  . co  m
 */
public final String getLastOccurrence() {
    if (lastOccurrenceTime == 0) {
        return "Never";
    } else {
        DateTime dt = new DateTime(new Date(lastOccurrenceTime));
        LocalDateTime ldt = dt.toLocalDateTime();
        return TimeUtils.compose24Hours(ldt.getHourOfDay(), ldt.getMinuteOfHour()) + " "
                + TimeUtils.composeDDMMYYYYDate(ldt.getDayOfMonth(), ldt.getMonthOfYear(), ldt.getYear());
    }
}

From source file:playground.johannes.gsv.synPop.invermo.Date2TimeTask.java

License:Open Source License

private LocalDateTime getReference(String date) {
    LocalDateTime dateTime = SplitPlanTask.formatter.parseLocalDateTime(date);
    return new LocalDateTime(dateTime.getYear(), dateTime.getMonthOfYear(), dateTime.getDayOfMonth(), 0, 0);
}

From source file:propel.core.utils.ConversionUtils.java

License:Open Source License

/**
 * Converts a Joda LocalDateTime object to an XML Gregorian Calendar data type
 *///from w  w w. j a va  2s. c o m
@Validate
public static XMLGregorianCalendar toXMLGregorianCalendar(@NotNull final LocalDateTime value)
        throws DatatypeConfigurationException {
    val gc = new GregorianCalendar(value.getYear(), value.getMonthOfYear() - 1, value.getDayOfMonth(),
            value.getHourOfDay(), value.getMinuteOfHour(), value.getSecondOfMinute());
    gc.set(Calendar.MILLISECOND, value.getMillisOfSecond());

    return DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);
}

From source file:qunar.tc.qmq.delay.store.log.ScheduleOffsetResolver.java

License:Apache License

private static long day(final LocalDateTime localDateTime) {
    return localDateTime.getDayOfMonth() * 10000L;
}