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

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

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

ZoneOffsetTransitionRule.getDayOfMonthIndicator介绍

[英]Gets the indicator of the day-of-month of the transition.

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

If the rule defines a week where the transition might occur, then the day defines either the start of the end of the transition week.

If the value is positive, then it represents a normal day-of-month, and is the earliest possible date that the transition can be. The date may refer to 29th February which should be treated as 1st March in non-leap years.

If the value is negative, then it represents the number of days back from the end of the month where -1 is the last day of the month. In this case, the day identified is the latest possible date that the transition can be.
[中]获取转换月份的日期的指示器。
如果规则定义了一个确切的日期,那么这一天就是该日期的月份。
如果规则定义了可能发生过渡的一周,则该天定义了过渡周的开始和结束。
如果该值为正值,则它表示一个月中的正常日期,并且是可以进行转换的最早日期。该日期可能指的是2月29日,在非闰年中应视为3月1日。
如果该值为负数,则表示从月底算起的天数,其中-1是该月的最后一天。在这种情况下,确定的日期是过渡可能的最新日期。

代码示例

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

} while ((ldt = ldt.plus(Period.ofWeeks(1))).getMonth() == month);
Integer dayOfMonth = allDaysOfWeek.ceiling(transitionRule.getDayOfMonthIndicator());
if (dayOfMonth == null) {
  dayOfMonth = allDaysOfWeek.last();
  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

} while ((ldt = ldt.plus(Period.ofWeeks(1))).getMonth() == month);
Integer dayOfMonth = allDaysOfWeek.ceiling(transitionRule.getDayOfMonthIndicator());
if (dayOfMonth == null) {
  dayOfMonth = allDaysOfWeek.last();
  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

DaylightSavingRule rule;
int dom = zotr.getDayOfMonthIndicator(); // -28 bis +31 (ohne 0)
DayOfWeek dayOfWeek = zotr.getDayOfWeek();

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

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

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

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

相关文章