Example usage for org.joda.time DateTime getMonthOfYear

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

Introduction

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

Prototype

public int getMonthOfYear() 

Source Link

Document

Get the month of year field value.

Usage

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 *  ?? ? ?  ?/* ww w.  jav  a 2s. c om*/
 *
 * @param moment ??
 * @return ?  ?
 */
public static DateTime startTimeOfHalfyear(DateTime moment) {
    return startTimeOfHalfyear(moment.getYear(), moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * End time of halfyear./* ww  w . j a  va 2s. c o m*/
 *
 * @param moment the moment
 * @return the date time
 */
public static DateTime endTimeOfHalfyear(DateTime moment) {
    return endTimeOfHalfyear(moment.getYear(), moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * Start time of quarter./*from   ww w.jav a 2  s . co m*/
 *
 * @param moment the moment
 * @return the date time
 */
public static DateTime startTimeOfQuarter(DateTime moment) {
    return startTimeOfQuarter(moment.getYear(), moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * End time of quarter.// ww w .  j a v  a 2  s.c o m
 *
 * @param moment the moment
 * @return the date time
 */
public static DateTime endTimeOfQuarter(DateTime moment) {
    return endTimeOfQuarter(moment.getYear(), moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * Start time of month./* w w  w.j a  v a  2  s. c o  m*/
 *
 * @param moment the moment
 * @return the date time
 */
public static DateTime startTimeOfMonth(DateTime moment) {
    return new DateTime(moment.getYear(), moment.getMonthOfYear(), 1, 0, 0);
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * Halfyear of./*from  ww  w  .  jav a  2s.  co m*/
 *
 * @param moment the moment
 * @return the halfyear
 */
public static Halfyear halfyearOf(DateTime moment) {
    return halfyearOf(moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 * Quarter of./*www  . j a v  a  2  s . c om*/
 *
 * @param moment the moment
 * @return the quarter
 */
public static Quarter quarterOf(DateTime moment) {
    return quarterOf(moment.getMonthOfYear());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**  ??? ? . */
public static DateTime setYear(DateTime moment, int year) {
    return setDate(moment, year, moment.getMonthOfYear(), moment.getDayOfMonth());
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**  ??? ? . */
public static DateTime setDay(DateTime moment, int dayOfMonth) {
    return setDate(moment, moment.getYear(), moment.getMonthOfYear(), dayOfMonth);
}

From source file:kr.debop4j.timeperiod.tools.Times.java

License:Apache License

/**
 *  ??  //??  ?? ./*from  w ww  .jav  a 2 s.c o  m*/
 *
 * @param moment     the moment
 * @param dayOfMonth the day of month
 * @return the date time
 */
public static DateTime trimToDay(DateTime moment, int dayOfMonth) {
    return asDate(moment.getYear(), moment.getMonthOfYear(), dayOfMonth);
}