public enum DatePeriods extends Enum<DatePeriods>
1990-04-15 00:00:00这天调整了夏令时,即在4月15号0点的时候将表调快了一小时,导致这一天少了一小时。 1986年4月,中国中央有关部门发出“在全国范围内实行夏时制的通知”,具体作法是:每年从四月中旬第一个星 期日的凌晨2时整(北京时间),将时钟拨快一小时,即将表针由2时拨至3时,夏令时开始;到九月中旬第一个 星期日的凌晨2时整(北京夏令时),再将时钟拨回一小时,即将表针由2时拨至1时,夏令时结束。从1986年到 1991年的六个年度,除1986年因是实行夏时制的第一年,从5月4日开始到9月14日结束外,其它年份均按规定的 时段施行。在夏令时开始和结束前几天,新闻媒体均刊登有关部门的通告。1992年起,夏令时暂停实行。 时间周期,计算周期性的时间段
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DatePeriods.Segment |
| 枚举常量和说明 |
|---|
ANNUAL
每年度
|
DAILY
每天
|
HOURLY
每小时的
|
MINUTELY
每分钟的
|
MONTHLY
每月
|
PER_SECOND
每秒钟的
|
QUARTERLY
每季度
|
SEMIANNUAL
每半年
|
WEEKLY
每周
|
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ORIGINAL_DATE_TIME
2018-01-01: the first day of year, month, week
|
| 限定符和类型 | 方法和说明 |
|---|---|
DatePeriods.Segment |
next(Date original,
Date target,
int step,
int next) |
DatePeriods.Segment |
next(Date target,
int next) |
DatePeriods.Segment |
next(Date target,
int step,
int next) |
DatePeriods.Segment |
next(org.joda.time.LocalDateTime target,
int next) |
DatePeriods.Segment |
next(org.joda.time.LocalDateTime target,
int step,
int next) |
DatePeriods.Segment |
next(org.joda.time.LocalDateTime original,
org.joda.time.LocalDateTime target,
int step,
int next)
Compute the next segment based original and reference target
|
static DatePeriods |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static DatePeriods[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final DatePeriods PER_SECOND
public static final DatePeriods MINUTELY
public static final DatePeriods HOURLY
public static final DatePeriods DAILY
public static final DatePeriods WEEKLY
public static final DatePeriods MONTHLY
public static final DatePeriods QUARTERLY
public static final DatePeriods SEMIANNUAL
public static final DatePeriods ANNUAL
public static DatePeriods[] values()
for (DatePeriods c : DatePeriods.values()) System.out.println(c);
public static DatePeriods valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public final DatePeriods.Segment next(org.joda.time.LocalDateTime original, org.joda.time.LocalDateTime target, int step, int next)
original - the period originaltarget - the target of next referencestep - the period stepnext - the next of target segmentSegment(begin, end)public final DatePeriods.Segment next(org.joda.time.LocalDateTime target, int step, int next)
public final DatePeriods.Segment next(org.joda.time.LocalDateTime target, int next)
public final DatePeriods.Segment next(Date original, Date target, int step, int next)
public final DatePeriods.Segment next(Date target, int step, int next)
public final DatePeriods.Segment next(Date target, int next)
Copyright © 2023. All rights reserved.