@JsType(isNative=true, namespace="Cesium", name="JulianDate") public class JulianDate extends Object
Modifier and Type | Field and Description |
---|---|
int |
dayNumber
Gets or sets the list of leap seconds used throughout Cesium.
|
LeapSecond[] |
leapSeconds
Gets or sets the list of leap seconds used throughout Cesium.
|
int |
secondsOfDay
Gets or sets the number of seconds into the current day.
|
Constructor and Description |
---|
JulianDate()
Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).
|
JulianDate(double julianDayNumber)
Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).
|
JulianDate(double julianDayNumber,
double secondsOfDay)
Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).
|
JulianDate(double julianDayNumber,
double secondsOfDay,
Integer timeStandard)
Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).
|
Modifier and Type | Method and Description |
---|---|
static JulianDate |
addDays(JulianDate julianDate,
int days,
JulianDate result)
Adds the provided number of days to the provided date instance.
|
static JulianDate |
addHours(JulianDate julianDate,
int hours,
JulianDate result)
Adds the provided number of hours to the provided date instance.
|
static JulianDate |
addMinutes(JulianDate julianDate,
int minutes,
JulianDate result)
Adds the provided number of minutes to the provided date instance.
|
static JulianDate |
addSeconds(JulianDate julianDate,
int seconds,
JulianDate result)
Adds the provided number of seconds to the provided date instance.
|
JulianDate |
clone()
Duplicates this instance.
|
static JulianDate |
clone(JulianDate julianDate)
Duplicates a JulianDate instance.
|
static JulianDate |
clone(JulianDate julianDate,
JulianDate result)
Duplicates a JulianDate instance.
|
static int |
compare(JulianDate left,
JulianDate right)
Compares two instances.
|
static int |
computeTaiMinusUtc(JulianDate julianDate)
Computes the number of seconds the provided instance is ahead of UTC.
|
static int |
daysDifference(JulianDate left,
JulianDate right)
Computes the difference in days between the provided instance.
|
boolean |
equals(JulianDate right)
Compares this and the provided instance and returns true if they are equal, false otherwise.
|
static boolean |
equals(JulianDate left,
JulianDate right)
Compares two instances and returns true if they are equal, false otherwise.
|
boolean |
equalsEpsilon(JulianDate right,
int epsilon)
Compares this and the provided instance and returns true if they are within epsilon seconds of each other.
|
static boolean |
equalsEpsilon(JulianDate left,
JulianDate right,
int epsilon)
Compares two instances and returns true if they are within epsilon seconds of each other.
|
static JulianDate |
fromDate(JsDate date)
Creates a new instance from a JavaScript Date.
|
static JulianDate |
fromDate(JsDate date,
JulianDate result)
Creates a new instance from a JavaScript Date.
|
static JulianDate |
fromIso8601(String iso8601String)
Creates a new instance from a from an ISO 8601 date.
|
static JulianDate |
fromIso8601(String iso8601String,
JulianDate result)
Creates a new instance from a from an ISO 8601 date.
|
static boolean |
greaterThan(JulianDate left,
JulianDate right)
Compares the provided instances and returns true if left is later than right, false otherwise.
|
static boolean |
greaterThanOrEquals(JulianDate left,
JulianDate right)
Compares the provided instances and returns true if left is later than or equal to right, false otherwise.
|
static boolean |
lessThan(JulianDate left,
JulianDate right)
Compares the provided instances and returns true if left is earlier than right, false otherwise.
|
static boolean |
lessThanOrEquals(JulianDate left,
JulianDate right)
Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.
|
static JulianDate |
now()
Creates a new instance that represents the current system time.
|
static JulianDate |
now(JulianDate result)
Creates a new instance that represents the current system time.
|
static int |
secondsDifference(JulianDate left,
JulianDate right)
Computes the difference in seconds between the provided instance.
|
static JsDate |
toDate(JulianDate julianDate)
Creates a JavaScript Date from the provided instance.
|
static GregorianDate |
toGregorianDate(JulianDate julianDate)
Creates a GregorianDate from the provided instance.
|
static GregorianDate |
toGregorianDate(JulianDate julianDate,
GregorianDate result)
Creates a GregorianDate from the provided instance.
|
static String |
toIso8601(JulianDate julianDate)
Creates an ISO8601 representation of the provided date.
|
static String |
toIso8601(JulianDate julianDate,
int precision)
Creates an ISO8601 representation of the provided date.
|
String |
toString()
Creates a string representing this date in ISO8601 format.
|
static int |
totalDays(JulianDate julianDate)
Computes the total number of whole and fractional days represented by the provided instance.
|
public LeapSecond[] leapSeconds
public int dayNumber
public int secondsOfDay
@JsConstructor public JulianDate()
@JsConstructor public JulianDate(double julianDayNumber)
julianDayNumber
- The Julian Day Number representing the number of whole days. Fractional days will also be
handled correctly. Default: 0.@JsConstructor public JulianDate(double julianDayNumber, double secondsOfDay)
julianDayNumber
- The Julian Day Number representing the number of whole days. Fractional days will also be
handled correctly. Default: 0.secondsOfDay
- The number of seconds into the current Julian Day Number. Fractional seconds,
negative seconds and seconds greater than a day will be handled correctly. Default: 0.@JsConstructor public JulianDate(double julianDayNumber, double secondsOfDay, Integer timeStandard)
julianDayNumber
- The Julian Day Number representing the number of whole days. Fractional days will also be
handled correctly. Default: 0.secondsOfDay
- The number of seconds into the current Julian Day Number. Fractional seconds,
negative seconds and seconds greater than a day will be handled correctly. Default: 0.timeStandard
- The time standard in which the first two parameters are defined. Default: TimeStandard.UTC()
.public static JulianDate addDays(JulianDate julianDate, int days, JulianDate result)
julianDate
- The date.days
- The number of days to add or subtract.result
- An existing instance to use for the result.public static JulianDate addHours(JulianDate julianDate, int hours, JulianDate result)
julianDate
- The date.hours
- The number of hours to add or subtract.result
- An existing instance to use for the result.public static JulianDate addMinutes(JulianDate julianDate, int minutes, JulianDate result)
julianDate
- The date.minutes
- The number of minutes to add or subtract.result
- An existing instance to use for the result.public static JulianDate addSeconds(JulianDate julianDate, int seconds, JulianDate result)
julianDate
- The date.seconds
- The number of seconds to add or subtract.result
- An existing instance to use for the result.public static JulianDate clone(JulianDate julianDate)
julianDate
- The date to duplicate.public static JulianDate clone(JulianDate julianDate, JulianDate result)
julianDate
- The date to duplicate.result
- An existing instance to use for the result.public static int compare(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static int computeTaiMinusUtc(JulianDate julianDate)
julianDate
- The date.public static int daysDifference(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static boolean equals(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static boolean equalsEpsilon(JulianDate left, JulianDate right, int epsilon)
left
- The first instance.right
- The second instance.epsilon
- The maximum number of seconds that should separate the two instances.public static JulianDate fromDate(JsDate date)
date
- A JavaScript Date.public static JulianDate fromDate(JsDate date, JulianDate result)
date
- A JavaScript Date.result
- An existing instance to use for the result.public static JulianDate fromIso8601(String iso8601String)
iso8601String
- An ISO 8601 date.public static JulianDate fromIso8601(String iso8601String, JulianDate result)
iso8601String
- An ISO 8601 date.result
- An existing instance to use for the result.public static boolean greaterThan(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static boolean greaterThanOrEquals(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static boolean lessThan(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static boolean lessThanOrEquals(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static JulianDate now()
public static JulianDate now(JulianDate result)
result
- An existing instance to use for the result.public static int secondsDifference(JulianDate left, JulianDate right)
left
- The first instance.right
- The second instance.public static JsDate toDate(JulianDate julianDate)
julianDate
- The date to be converted.public static GregorianDate toGregorianDate(JulianDate julianDate)
julianDate
- The date to be converted.public static GregorianDate toGregorianDate(JulianDate julianDate, GregorianDate result)
julianDate
- The date to be converted.result
- An existing instance to use for the result.public static String toIso8601(JulianDate julianDate)
julianDate
- The date to be converted.public static String toIso8601(JulianDate julianDate, int precision)
julianDate
- The date to be converted.precision
- The number of fractional digits used to represent the seconds component.
By default, the most precise representation is used.public static int totalDays(JulianDate julianDate)
julianDate
- The date.public JulianDate clone()
public boolean equals(JulianDate right)
right
- The second instance.public boolean equalsEpsilon(JulianDate right, int epsilon)
right
- The second instance.epsilon
- The maximum number of seconds that should separate the two instances.Copyright © 2019. All rights reserved.