Example usage for org.joda.time ReadableDateTime getMonthOfYear

List of usage examples for org.joda.time ReadableDateTime getMonthOfYear

Introduction

In this page you can find the example usage for org.joda.time ReadableDateTime getMonthOfYear.

Prototype

int getMonthOfYear();

Source Link

Document

Get the month of year field value.

Usage

From source file:com.barchart.feed.ddf.message.provider.CodecHelper.java

License:BSD License

/** time zone information is discarded */
static final void encodeTimeStamp(final ReadableDateTime dateTime, final ByteBuffer buffer) {

    // base fields
    buffer.put(DDF_CENTURY); // century
    buffer.put(encodeTimeStampByte(dateTime.getYearOfCentury())); // year
    buffer.put(encodeTimeStampByte(dateTime.getMonthOfYear())); // month
    buffer.put(encodeTimeStampByte(dateTime.getDayOfMonth())); // day
    buffer.put(encodeTimeStampByte(dateTime.getHourOfDay())); // hours
    buffer.put(encodeTimeStampByte(dateTime.getMinuteOfHour())); // minutes
    buffer.put(encodeTimeStampByte(dateTime.getSecondOfMinute())); // seconds

    // milliseconds
    final int millisOfSecond = dateTime.getMillisOfSecond();
    buffer.put((byte) (millisOfSecond & 0xFF)); // low byte
    buffer.put((byte) ((millisOfSecond >>> 8) & 0xFF)); // high byte

}

From source file:com.google.ical.compat.jodatime.DateTimeIteratorFactory.java

License:Apache License

static DateValue dateTimeToDateValue(ReadableDateTime dt) {
    return new DateTimeValueImpl(dt.getYear(), dt.getMonthOfYear(), dt.getDayOfMonth(), dt.getHourOfDay(),
            dt.getMinuteOfHour(), dt.getSecondOfMinute());
}

From source file:com.tmathmeyer.sentinel.ui.views.month.MonthCalendar.java

License:Open Source License

/**
 * Gets the DayStyle of given date//from w w w  .  j  a v a  2s.  co  m
 * 
 * @param date
 * @return
 */
protected DayStyle getMarker(ReadableDateTime date) {
    if (date != null && time != null && date.getMonthOfYear() == time.getMonthOfYear()) {
        return (isToday(date) ? DayStyle.Today : DayStyle.Normal);
    }

    return DayStyle.OutOfMonth;
}

From source file:org.springframework.analytics.metrics.redis.RedisAggregateCounterRepository.java

License:Apache License

private long[] getMinCountsForHour(String name, ReadableDateTime dateTime) {
    return getMinCountsForHour(name, dateTime.getYear(), dateTime.getMonthOfYear(), dateTime.getDayOfMonth(),
            dateTime.getHourOfDay());/*from  w  ww . j  a  v a  2  s .co m*/
}