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

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

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

ZoneOffsetTransitionRule.getDayOfWeek介绍

[英]Gets the day-of-week of the transition.

If the rule defines an exact date then this returns null.

If the rule defines a week where the cutover might occur, then this method returns the day-of-week that the month-day will be adjusted to. If the day is positive then the adjustment is later. If the day is negative then the adjustment is earlier.
[中]获取转换的星期几。
如果规则定义了一个确切的日期,则返回null。
如果规则定义了可能发生切换的一周,则此方法返回将调整月份的星期几。如果当天为正值,则调整将推迟。如果当天为负值,则调整时间提前。

代码示例

代码示例来源:origin: org.mnode.ical4j/ical4j

DayOfWeek transitionRuleDayOfWeek = transitionRule.getDayOfWeek();
LocalDateTime ldt = LocalDateTime.now(zoneId)
    .with(TemporalAdjusters.firstInMonth(transitionRuleDayOfWeek))
  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

DayOfWeek transitionRuleDayOfWeek = transitionRule.getDayOfWeek();
LocalDateTime ldt = LocalDateTime.now(zoneId)
    .with(TemporalAdjusters.firstInMonth(transitionRuleDayOfWeek))
  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();

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

tr.offsetAfter = zr.getOffsetAfter().getTotalSeconds();
tr.standardOffset = zr.getStandardOffset().getTotalSeconds();
tr.dow = zr.getDayOfWeek() == null ? -1 : zr.getDayOfWeek().getValue();
tr.dom = zr.getDayOfMonthIndicator();
tr.month = zr.getMonth().getValue();

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

tr.offsetAfter = zr.getOffsetAfter().getTotalSeconds();
tr.standardOffset = zr.getStandardOffset().getTotalSeconds();
tr.dow = zr.getDayOfWeek() == null ? -1 : zr.getDayOfWeek().getValue();
tr.dom = zr.getDayOfMonthIndicator();
tr.month = zr.getMonth().getValue();

相关文章