java.time.zone.ZoneOffsetTransitionRule.getMonth()方法的使用及代码示例

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

本文整理了Java中java.time.zone.ZoneOffsetTransitionRule.getMonth()方法的一些代码示例,展示了ZoneOffsetTransitionRule.getMonth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneOffsetTransitionRule.getMonth()方法的具体详情如下:
包路径:java.time.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: org.mnode.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(startDate.withMonth(transitionRule.getMonth().getValue())
      .withDayOfMonth(transitionRule.getDayOfMonthIndicator())
      .with(transitionRule.getDayOfWeek()).format(DateTimeFormatter.ofPattern(DATE_TIME_TPL))));

代码示例来源:origin: 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(startDate.withMonth(transitionRule.getMonth().getValue())
      .withDayOfMonth(transitionRule.getDayOfMonthIndicator())
      .with(transitionRule.getDayOfWeek()).format(DateTimeFormatter.ofPattern(DATE_TIME_TPL))));

代码示例来源:origin: net.time4j/time4j-olson

DayOfWeek dayOfWeek = zotr.getDayOfWeek();
Month month = Month.valueOf(zotr.getMonth().getValue());

代码示例来源:origin: bluestreak01/questdb

tr.dow = zr.getDayOfWeek() == null ? -1 : zr.getDayOfWeek().getValue();
tr.dom = zr.getDayOfMonthIndicator();
tr.month = zr.getMonth().getValue();
tr.midnightEOD = zr.isMidnightEndOfDay();
tr.hour = zr.getLocalTime().getHour();

代码示例来源:origin: bluestreak01/questdb

tr.dow = zr.getDayOfWeek() == null ? -1 : zr.getDayOfWeek().getValue();
tr.dom = zr.getDayOfMonthIndicator();
tr.month = zr.getMonth().getValue();
tr.midnightEOD = zr.isMidnightEndOfDay();
tr.hour = zr.getLocalTime().getHour();

相关文章