当前位置: 首页>>代码示例>>Java>>正文


Java SerialDate.DECEMBER属性代码示例

本文整理汇总了Java中org.jfree.date.SerialDate.DECEMBER属性的典型用法代码示例。如果您正苦于以下问题:Java SerialDate.DECEMBER属性的具体用法?Java SerialDate.DECEMBER怎么用?Java SerialDate.DECEMBER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jfree.date.SerialDate的用法示例。


在下文中一共展示了SerialDate.DECEMBER属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: previous

/**
 * Returns the month preceding this one.
 *
 * @return the month preceding this one.
 */
public RegularTimePeriod previous() {

    final Month result;
    if (this.month != SerialDate.JANUARY) {
        result = new Month(this.month - 1, this.year);
    }
    else {
        final Year prevYear = (Year) this.year.previous();
        if (prevYear != null) {
            result = new Month(SerialDate.DECEMBER, prevYear);
        }
        else {
            result = null;
        }
    }
    return result;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:Month.java

示例2: next

/**
 * Returns the month following this one.
 *
 * @return the month following this one.
 */
public RegularTimePeriod next() {
    final Month result;
    if (this.month != SerialDate.DECEMBER) {
        result = new Month(this.month + 1, this.year);
    }
    else {
        final Year nextYear = (Year) this.year.next();
        if (nextYear != null) {
            result = new Month(SerialDate.JANUARY, nextYear);
        }
        else {
            result = null;
        }
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:Month.java

示例3: test31Dec9999Previous

/**
 * Set up a day equal to 31 December 9999.  Request the previous day, it should be 30 December
 * 9999.
 */
public void test31Dec9999Previous() {

    final Day dec31st9999 = new Day(31, SerialDate.DECEMBER, 9999);
    final Day previous = (Day) dec31st9999.previous();
    assertEquals(30, previous.getDayOfMonth());

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:DayTests.java

示例4: test31Dec9999Next

/**
 * Set up a day equal to 31 December 9999.  Request the next day, it should be null.
 */
public void test31Dec9999Next() {

    final Day dec31st9999 = new Day(31, SerialDate.DECEMBER, 9999);
    final Day next = (Day) dec31st9999.next();
    assertNull(next);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:10,代码来源:DayTests.java

示例5: testLastHourPrevious

/**
 * Set up an hour equal to hour zero, 1 January 1900.  Request the previous hour, it should be
 * null.
 */
public void testLastHourPrevious() {

    final Hour last = new Hour(23, new Day(31, SerialDate.DECEMBER, 9999));
    final Hour previous = (Hour) last.previous();
    assertEquals(22, previous.getHour());
    assertEquals(9999, previous.getYear());

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:HourTests.java

示例6: testLastHourNext

/**
 * Set up an hour equal to hour zero, 1 January 1900.  Request the next hour, it should be
 * null.
 */
public void testLastHourNext() {

    final Hour last = new Hour(23, new Day(31, SerialDate.DECEMBER, 9999));
    final Hour next = (Hour) last.next();
    assertNull(next);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:HourTests.java

示例7: getLastMillisecond

/**
 * Returns the last millisecond of the year, evaluated using the supplied
 * calendar (which determines the time zone).
 *
 * @param calendar  the calendar.
 *
 * @return the last millisecond of the year.
 */
public long getLastMillisecond(final Calendar calendar) {

    final Day dec31 = new Day(31, SerialDate.DECEMBER, this.year);
    return dec31.getLastMillisecond(calendar);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:Year.java


注:本文中的org.jfree.date.SerialDate.DECEMBER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。