org.threeten.bp.zone.ZoneOffsetTransitionRule.getMonth()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.threeten.bp.zone.ZoneOffsetTransitionRule.getMonth()方法的一些代码示例,展示了ZoneOffsetTransitionRule.getMonth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneOffsetTransitionRule.getMonth()方法的具体详情如下:
包路径:org.threeten.bp.zone.ZoneOffsetTransitionRule
类名称:ZoneOffsetTransitionRule
方法名:getMonth

ZoneOffsetTransitionRule.getMonth介绍

[英]Gets the month of the transition.

If the rule defines an exact date then the month is the month of that date.

If the rule defines a week where the transition might occur, then the month if the month of either the earliest or latest possible date of the cutover.
[中]获取转换的月份。
如果规则定义了一个确切的日期,那么月份就是该日期的月份。
如果该规则定义了可能发生转换的一周,那么该月是最早或最晚的转换日期所在的月份。

代码示例

代码示例来源:origin: stackoverflow.com

rule.getMonth().getValue(),
rule.createTransition(thisYear).getDateTimeBefore().get(
  weekOfMonth),

代码示例来源:origin: net.oneandone.ical4j/ical4j

int transitionRuleMonthValue = transitionRule.getMonth().getValue();
DayOfWeek transitionRuleDayOfWeek = transitionRule.getDayOfWeek();
LocalDateTime ldt = LocalDateTime.now(zoneId)
  observance.getProperties().add(offsetTo);
  observance.getProperties().add(rrule);
  observance.getProperties().add(new DtStart(String.format(DATE_TIME_TPL, startDate.withMonth(transitionRule.getMonth().getValue())
                                                      .withDayOfMonth(transitionRule.getDayOfMonthIndicator())
                                                      .with(transitionRule.getDayOfWeek()))));

相关文章