new Cesium.JulianDate(julianDayNumber, secondsOfDay, timeStandard)

代表天文Julian日期,即1月1日-4712(公元前4713年)中午起的天数. 为了提高精确度,这个班级存储了日期和秒的全部数字部分 日期的一部分,以单独的组件表示。 为了对算术和代表安全 跳跃秒,日期总是存储在国际原子时间标准中 TimeStandard.TAI.
Name Type Default Description
julianDayNumber number 0.0 optional 朱利安日号代表全天数. 小数日也会被正确处理.
secondsOfDay number 0.0 optional 进入当前朱利安日数的秒数. 小数秒,负秒和大于一天的秒将被正确处理.
timeStandard TimeStandard TimeStandard.UTC optional The time standard in which the first two parameters are defined.

Members

static Cesium.JulianDate.leapSeconds : Array.<LeapSecond>

获取或设置整个 NT 0 使用的跳跃秒列表.

dayNumber : number

获得或设定全天数.

secondsOfDay : number

获取或设定当日的秒数.

Methods

static Cesium.JulianDate.addDays(julianDate, days, result)JulianDate

在提供的日期实例中添加所提供的天数.
Name Type Description
julianDate JulianDate The date.
days number 增减日数.
result JulianDate 用于结果的现有实例.
Returns:
修改的结果参数 .

static Cesium.JulianDate.addHours(julianDate, hours, result)JulianDate

在提供的日期实例中添加提供的小时数.
Name Type Description
julianDate JulianDate The date.
hours number 增减时数.
result JulianDate 用于结果的现有实例.
Returns:
修改的结果参数 .

static Cesium.JulianDate.addMinutes(julianDate, minutes, result)JulianDate

在提供的日期实例中添加提供的分钟数.
Name Type Description
julianDate JulianDate The date.
minutes number 增减的分钟数.
result JulianDate 用于结果的现有实例.
Returns:
修改的结果参数 .

static Cesium.JulianDate.addSeconds(julianDate, seconds, result)JulianDate

在提供的日期实例中添加所提供的秒数.
Name Type Description
julianDate JulianDate The date.
seconds number 要加减的秒数 .
result JulianDate 用于结果的现有实例.
Returns:
修改的结果参数 .

static Cesium.JulianDate.clone(julianDate, result)JulianDate

Duplicates a JulianDate instance.
Name Type Description
julianDate JulianDate 重复的日期 .
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 。 返回未定义的 JulianDate 未定义 .

static Cesium.JulianDate.compare(left, right)number

比较两个实例.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
负值如果左小于右,负值如果左大于右,负值如果左和右相等,则为零.

static Cesium.JulianDate.computeTaiMinusUtc(julianDate)number

Computes the number of seconds the provided instance is ahead of UTC.
Name Type Description
julianDate JulianDate The date.
Returns:
提供实例的秒数领先于 NT 0

static Cesium.JulianDate.daysDifference(left, right)number

计算所提供实例之间的天数差异.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
差异,以日计,当从 NT 2 左 NT 3 中减去 NT 0 右 NT 1 中.

static Cesium.JulianDate.equals(left, right)boolean

比较两个实例,如果它们相等,则返回 NT 0 true NT 1 ,否则返回 NT 2 false NT 3 .
Name Type Description
left JulianDate optional 初释.
right JulianDate optional 二证.
Returns:
如果日期相等,则使用 NT 0 real NT 1 ;否则, NT 2 false NT 3 .

static Cesium.JulianDate.equalsEpsilon(left, right, epsilon)boolean

比较两个实例,如果在 NT 2 epsilon NT 3 秒内,则返回 NT 0 真 NT 1 秒 彼此间. 也就是说,为了将日期视为平等的日期(以及 this function to return true), the absolute value of the difference between them, in 秒,必须小于 NT 0 epsilon NT 1 .
Name Type Default Description
left JulianDate optional 初释.
right JulianDate optional 二证.
epsilon number 0 optional The maximum number of seconds that should separate the two instances.
Returns:
如果两个日期相隔时间在 NT 2 epsilon NT 3 秒之内,则该时间为 NT 0 real NT 1 ;否则为 NT 4 false NT 5 .

static Cesium.JulianDate.fromDate(date, result)JulianDate

从 JavaScript Date 创建新实例.
Name Type Description
date Date A JavaScript Date.
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .
Throws:

static Cesium.JulianDate.fromGregorianDate(date, result)JulianDate

从 GregorianDate 创建新实例.
Name Type Description
date GregorianDate A GregorianDate.
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .
Throws:

static Cesium.JulianDate.fromIso8601(iso8601String, result)JulianDate

Creates a new instance from a from an ISO 8601 date. This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601 规格,包括跳跃秒数和次毫升数,这些秒数被大多数JavaScript执行器丢弃.
Name Type Description
iso8601String string NT=0=8601约会.
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .
Throws:

static Cesium.JulianDate.greaterThan(left, right)boolean

Compares the provided instances and returns true if left is later than right, false otherwise.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
如果 如果 晚于 , 否则.

static Cesium.JulianDate.greaterThanOrEquals(left, right)boolean

比较所提供的实例并返回 true 如果 晚于或等于 , 否则.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
如果 如果 迟或等于 , 否则.

static Cesium.JulianDate.lessThan(left, right)boolean

比较所提供的实例,如果 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
如果 如果 早于 , 否则.

static Cesium.JulianDate.lessThanOrEquals(left, right)boolean

比较所提供实例,如果 早于或等于 , ,则返回 .
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
如果 如果 早于或等于 , 否则.

static Cesium.JulianDate.now(result)JulianDate

创建代表当前系统时间的新实例. This is equivalent to calling JulianDate.fromDate(new Date());.
Name Type Description
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

static Cesium.JulianDate.secondsDifference(left, right)number

计算所提供实例之间的秒数差异.
Name Type Description
left JulianDate 初释.
right JulianDate 二证.
Returns:
以秒计的差异,当从 NT 2 左 NT 3 中减去 NT 0 右 NT 1 中.

static Cesium.JulianDate.toDate(julianDate)Date

从所提供的实例创建 JavaScript 日期 . 由于 JavaScript 日期只准确到最近的毫秒和 cannot represent a leap second, consider using JulianDate.toGregorianDate instead. 如果提供的 JulianDate 在跳跃第二时,则使用前次.
Name Type Description
julianDate JulianDate 要转换的日期 .
Returns:
代表规定日期的新实例.

static Cesium.JulianDate.toGregorianDate(julianDate, result)GregorianDate

Creates a GregorianDate from the provided instance.
Name Type Description
julianDate JulianDate 要转换的日期 .
result GregorianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

static Cesium.JulianDate.toIso8601(julianDate, precision)string

Creates an ISO8601 representation of the provided date.
Name Type Description
julianDate JulianDate 要转换的日期 .
precision number optional 用于表示秒组件的分数位数。 默认情况下,使用最精确的表示.
Returns:
所提供日期的 NT 代表.

static Cesium.JulianDate.totalDays(julianDate)number

计算所提供实例所代表的全天和分日总数.
Name Type Description
julianDate JulianDate The date.
Returns:
朱利安日期作为单浮点数.

clone(result)JulianDate

重复这个例子.
Name Type Description
result JulianDate optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

equals(right)boolean

比较此实例和提供的实例, 如果它们相等, 则返回 NT 0 true NT % 1 , 否则返回 NT 2 false NT % 3 .
Name Type Description
right JulianDate optional 二证.
Returns:
如果日期相等,则使用 NT 0 real NT 1 ;否则, NT 2 false NT 3 .

equalsEpsilon(right, epsilon)boolean

Compares this and the provided instance and returns true if they are within epsilon seconds of 彼此间. 也就是说,为了将日期视为平等的日期(以及 this function to return true), the absolute value of the difference between them, in 秒,必须小于 NT 0 epsilon NT 1 .
Name Type Default Description
right JulianDate optional 二证.
epsilon number 0 optional The maximum number of seconds that should separate the two instances.
Returns:
如果两个日期相隔时间在 NT 2 epsilon NT 3 秒之内,则该时间为 NT 0 real NT 1 ;否则为 NT 4 false NT 5 .

toString()string

以 NT 0 格式创建代表此日期的字符串.
Returns:
以 NT 0 格式代表这个日期的字符串 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.