cesiumlanguagewriter.YearMonthDay.getJulianDayNumber()方法的使用及代码示例

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

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

YearMonthDay.getJulianDayNumber介绍

[英]Gets the Julian day number for this YearMonthDay instance, assuming noon on this day.
[中]获取此YearMonthDay实例的Julian日数,假设当天中午。

代码示例

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

/**
* 
Convert this {@link GregorianDate} to a {@link JulianDate}.  The
{@link GregorianDate} is assumed to specify a time in the
specified {@link TimeStandard}.
* @param timeStandard 
The time standard in which this {@link GregorianDate} is expressed.  The returned
{@link JulianDate} will be expressed in this time standard as well, if possible.
* @return A {@link JulianDate} representing this date.
*/
@CS2JWarning("Unhandled attribute removed: Pure")
@Nonnull
public final JulianDate toJulianDate(@Nonnull TimeStandard timeStandard) {
  int julianDayNumber = m_yearMonthDay.getJulianDayNumber();
  double julianSecondsOfDay = getJulianSecondsOfDay();
  if (getIsLeapSecond()) {
    julianSecondsOfDay -= 1D;
  } else if (julianSecondsOfDay >= 43200.0) {
    julianDayNumber -= 1;
  }
  JulianDate result = new JulianDate(julianDayNumber, julianSecondsOfDay, timeStandard);
  if (getIsLeapSecond()) {
    result = result.addSeconds(1D);
  }
  return result;
}

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

boolean dayHasLeapSecond = LeapSeconds.getInstance().doesDayHaveLeapSecond(new YearMonthDay(year, month, day).getJulianDayNumber());
return dayHasLeapSecond && hour == 23 && minute == 59;

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

@Test
public final void testJulianDayNumber() {
  final int astronomicalJulianDayNumber = 2454959;
  YearMonthDay ymd = new YearMonthDay(astronomicalJulianDayNumber);
  Assert.assertEquals((int) astronomicalJulianDayNumber, (int) ymd.getJulianDayNumber());
}

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

@Test
public final void testRoundTripDefaultConstructed() {
  YearMonthDay ymd = new YearMonthDay();
  YearMonthDay ymd2 = new YearMonthDay(ymd.getJulianDayNumber());
  AssertHelper.assertEquals(ymd, ymd2);
}

相关文章