-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor julian date #1821
Refactor julian date #1821
Conversation
Turn all prototype functions (except for clone/equals/eqaulsEpsilon/compareTo) into static functions.
Default constructing a JulianDate no longer creates an instance set to the current time; I added JulianDate.now() for this purpose.
1. Clean up documentation. 2. Make all relevant function take result parameters.
Conflicts: Source/DynamicScene/SampledProperty.js
1. Removes the need for circular referneces between `LeapSecond` and `JulianDate`. 2. Moves array of leap seconds from `LeapSecond.leapSeconds` to `JulianDate.leapSeconds`
…nDate.getDaysDifference
* CZML property references now use a `#` symbol to separate identifier from property path. `objectId.position` should now be `objectId#position`. | ||
* `CesiumWidget.showErrorPanel` now takes a `message` parameter in between the previous `title` and `error` parameters. | ||
* `Event.removeEventListener` no longer throws `DeveloperError` if the `listener` does not exist; it now returns `false`. | ||
* Moved `LeapScond.leapSeconds` to `JulianDate.leapSeconds`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo LeapScond
CC #1407 |
*/ | ||
JulianDate.prototype.addMinutes = function(duration) { | ||
JulianDate.addMinutes = function(julianDate, minutes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the other addX
functions don't actually have the result
parameter that they are documented as having.
Actually take a result parameter in function that claim to.
All pending issues have been taken care of. |
Conflicts: CHANGES.md
LeapSecond.leapSeconds
toJulianDate.leapSeconds
.JulianDate
to be in line with other Core types.JulianDate.now()
instead.JulianDate.getJulianTimeFraction
andJulianDate.compareTo
new JulianDate()
->JulianDate.now()
date.getJulianDayNumber()
->date.dayNumber
date.getSecondsOfDay()
->secondsOfDay
date.getTotalDays()
->JulianDate.getTotalDays(date)
date.getSecondsDifference(arg1, arg2)
->JulianDate.getSecondsDifference(arg2, arg1)
(Note, order of arguments flipped)date.getDaysDifference(arg1, arg2)
->JulianDate.getDaysDifference(arg2, arg1)
(Note, order of arguments flipped)date.getTaiMinusUtc()
->JulianDate.getTaiMinusUtc(date)
date.addSeconds(seconds)
->JulianDate.addSeconds(date, seconds)
date.addMinutes(minutes)
->JulianDate.addMinutes(date, minutes)
date.addHours(hours)
->JulianDate.addHours(date, hours)
date.addDays(days)
->JulianDate.addDays(date, days)
date.lessThan(right)
->JulianDate.lessThan(left, right)
date.lessThanOrEquals (right)
->JulianDate.lessThanOrEquals (left, right)
date.greaterThan (right)
->JulianDate.greaterThan (left, right)
date.greaterThanOrEquals (right)
->JulianDate.greaterThanOrEquals (left, right)