当前位置: 首页>>代码示例>>Java>>正文


Java ZonedDateTime.toInstant方法代码示例

本文整理汇总了Java中org.threeten.bp.ZonedDateTime.toInstant方法的典型用法代码示例。如果您正苦于以下问题:Java ZonedDateTime.toInstant方法的具体用法?Java ZonedDateTime.toInstant怎么用?Java ZonedDateTime.toInstant使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.threeten.bp.ZonedDateTime的用法示例。


在下文中一共展示了ZonedDateTime.toInstant方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CompiledFunction

import org.threeten.bp.ZonedDateTime; //导入方法依赖的package包/类
/**
 * @param from Earliest time that the invoker is valid
 * @param to Latest time that the invoker is valid
 * @param now The valuation time
 * @param definitionSource The volatility surface definition source
 * @param specificationSource The volatility surface specification source
 */
public CompiledFunction(final ZonedDateTime from, final ZonedDateTime to, final ZonedDateTime now, final ConfigDBVolatilitySurfaceDefinitionSource definitionSource,
    final ConfigDBVolatilitySurfaceSpecificationSource specificationSource) {
  super(from.toInstant(), to.toInstant());
  _now = now;
  _definitionSource = definitionSource;
  _specificationSource = specificationSource;
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:15,代码来源:RawVolatilitySurfaceDataFunction.java

示例2: getDateOffsetWithYearFraction

import org.threeten.bp.ZonedDateTime; //导入方法依赖的package包/类
/**
 * Method that allows a fraction of a year to be added to a date. If the yearFraction that is used does not give an integer number of seconds, it is rounded to the nearest nanosecond. Note that the
 * number of days in a year is defined to be 365.25.
 * 
 * @param startDate the start date, not null
 * @param yearFraction the fraction of a year
 * @return the calculated date-time, not null
 * @throws IllegalArgumentException if the date is null
 */
public static ZonedDateTime getDateOffsetWithYearFraction(final ZonedDateTime startDate, final double yearFraction) {
  if (startDate == null) {
    throw new IllegalArgumentException("Date was null");
  }
  final Instant instant = startDate.toInstant();
  final Instant offsetDate = getDateOffsetWithYearFraction(instant, yearFraction);
  return ZonedDateTime.ofInstant(offsetDate, startDate.getZone());
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:18,代码来源:DateUtils.java

示例3: AbstractInvokingCompiledFunction

import org.threeten.bp.ZonedDateTime; //导入方法依赖的package包/类
/**
 * Creates an instance.
 * 
 * @param earliestInvocation earliest time this metadata and invoker are valid, null to indicate no lower validity bound
 * @param latestInvocation latest time this metadata and invoker are valid, null to indicate no upper validity bound
 */
protected AbstractInvokingCompiledFunction(final ZonedDateTime earliestInvocation, final ZonedDateTime latestInvocation) {
  super(earliestInvocation.toInstant(), latestInvocation.toInstant());
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:10,代码来源:AbstractFunction.java


注:本文中的org.threeten.bp.ZonedDateTime.toInstant方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。