gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 12:56:18 26 4
gpt4 key购买 nike

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

ZoneOffsetTransitionRule.createTransition介绍

[英]Creates a transition instance for the specified year.

Calculations are performed using the ISO-8601 chronology.
[中]为指定年份创建转换实例。
使用ISO-8601年表进行计算。

代码示例

代码示例来源:origin: ThreeTen/threetenbp

/**
 * Finds the appropriate transition array for the given year.
 *
 * @param year  the year, not null
 * @return the transition array, not null
 */
private ZoneOffsetTransition[] findTransitionArray(int year) {
  Integer yearObj = year;  // should use Year class, but this saves a class load
  ZoneOffsetTransition[] transArray = lastRulesCache.get(yearObj);
  if (transArray != null) {
    return transArray;
  }
  ZoneOffsetTransitionRule[] ruleArray = lastRules;
  transArray  = new ZoneOffsetTransition[ruleArray.length];
  for (int i = 0; i < ruleArray.length; i++) {
    transArray[i] = ruleArray[i].createTransition(year);
  }
  if (year < LAST_CACHED_YEAR) {
    lastRulesCache.putIfAbsent(yearObj, transArray);
  }
  return transArray;
}

代码示例来源:origin: org.threeten/threetenbp

/**
 * Finds the appropriate transition array for the given year.
 *
 * @param year  the year, not null
 * @return the transition array, not null
 */
private ZoneOffsetTransition[] findTransitionArray(int year) {
  Integer yearObj = year;  // should use Year class, but this saves a class load
  ZoneOffsetTransition[] transArray = lastRulesCache.get(yearObj);
  if (transArray != null) {
    return transArray;
  }
  ZoneOffsetTransitionRule[] ruleArray = lastRules;
  transArray  = new ZoneOffsetTransition[ruleArray.length];
  for (int i = 0; i < ruleArray.length; i++) {
    transArray[i] = ruleArray[i].createTransition(year);
  }
  if (year < LAST_CACHED_YEAR) {
    lastRulesCache.putIfAbsent(yearObj, transArray);
  }
  return transArray;
}

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

posixSpec.format(",M%d.%d.%d/%s",
  rule.getMonth().getValue(),
  rule.createTransition(thisYear).getDateTimeBefore().get(
    weekOfMonth),
  rule.getDayOfWeek().getValue() % 7,

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com