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


Java SerialDate.monthCodeToQuarter方法代码示例

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


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

示例1: Quarter

import org.jfree.date.SerialDate; //导入方法依赖的package包/类
/**
 * Constructs a Quarter, based on a date/time and time zone.
 *
 * @param time  the date/time.
 * @param zone  the zone.
 */
public Quarter(final Date time, final TimeZone zone) {

    final Calendar calendar = Calendar.getInstance(zone);
    calendar.setTime(time);
    final int month = calendar.get(Calendar.MONTH) + 1;
    this.quarter = SerialDate.monthCodeToQuarter(month);
    this.year = new Year(calendar.get(Calendar.YEAR));

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

示例2: Quarter

import org.jfree.date.SerialDate; //导入方法依赖的package包/类
/**
 * Constructs a Quarter, based on a date/time and time zone.
 *
 * @param time  the date/time.
 * @param zone  the zone (<code>null</code> not permitted).
 */
public Quarter(Date time, TimeZone zone) {
    Calendar calendar = Calendar.getInstance(zone);
    calendar.setTime(time);
    int month = calendar.get(Calendar.MONTH) + 1;
    this.quarter = (byte) SerialDate.monthCodeToQuarter(month);
    this.year = (short) calendar.get(Calendar.YEAR);
    peg(calendar);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:Quarter.java

示例3: Quarter

import org.jfree.date.SerialDate; //导入方法依赖的package包/类
/**
 * Constructs a Quarter, based on a date/time and time zone.
 *
 * @param time  the date/time.
 * @param zone  the zone (<code>null</code> not permitted).
 */
public Quarter(Date time, TimeZone zone) {
    // FIXME:  need a locale as well as a timezone
    Calendar calendar = Calendar.getInstance(zone);
    calendar.setTime(time);
    int month = calendar.get(Calendar.MONTH) + 1;
    this.quarter = (byte) SerialDate.monthCodeToQuarter(month);
    this.year = (short) calendar.get(Calendar.YEAR);
    peg(calendar);
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:Quarter.java

示例4: Quarter

import org.jfree.date.SerialDate; //导入方法依赖的package包/类
/**
 * Creates a new <code>Quarter</code> instance, using the specified
 * zone and locale.
 *
 * @param time  the current time.
 * @param zone  the time zone.
 * @param locale  the locale.
 *
 * @since 1.0.12
 */
public Quarter(Date time, TimeZone zone, Locale locale) {
    Calendar calendar = Calendar.getInstance(zone, locale);
    calendar.setTime(time);
    int month = calendar.get(Calendar.MONTH) + 1;
    this.quarter = (byte) SerialDate.monthCodeToQuarter(month);
    this.year = (short) calendar.get(Calendar.YEAR);
    peg(calendar);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:19,代码来源:Quarter.java


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