本文整理了Java中cesiumlanguagewriter.YearMonthDay.getJulianDayNumber()
方法的一些代码示例,展示了YearMonthDay.getJulianDayNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthDay.getJulianDayNumber()
方法的具体详情如下:
包路径:cesiumlanguagewriter.YearMonthDay
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!