-
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
Merged
Merged
Refactor julian date #1821
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cb6005c
Start refactoring JulianDate
mramato b8d8e7c
Merge remote-tracking branch 'origin/master' into refactor-julianDate
mramato 7a7423f
Ongoing JulianDate refactoring
mramato 70fd5b1
Ongoing JulianDate refactoring.
mramato 4eb6e72
Merge remote-tracking branch 'origin/master' into refactor-julianDate
mramato 25a7075
Refactor LeapSecond to be a simply data object.
mramato d57ee45
JulianDate doc cleanup.
mramato b083865
Swap order of parameters in JulianDate.getSecondsDifference and Julia…
mramato d8dab7c
Update changes
mramato 1878766
Fix typos
mramato a076b3c
Changes after review.
mramato b42ac31
Fix copy/paste error.
mramato 65e4452
Merge remote-tracking branch 'origin/master' into refactor-julianDate
mramato 9894723
Whitespace
shunter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Beta Releases | |
### b30 - 2014-07-01 | ||
|
||
* Breaking changes ([why so many?](https://groups.google.com/forum/#!topic/cesium-dev/Y_mG11IZD9k)) | ||
* Replaced `CameraFlightPath.createAnimation` with `Camera.flyTo` and replaced `CameraFlightPath.createAnimationRectangle` with `Camera.flyToRectangle`. Code that looked like: | ||
* Replaced `CameraFlightPath.createAnimation` with `Camera.flyTo` and replaced `CameraFlightPath.createAnimationRectangle` with `Camera.flyToRectangle`. Code that looked like: | ||
|
||
scene.animations.add(Cesium.CameraFlightPath.createAnimation(scene, { | ||
destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0) | ||
|
@@ -19,14 +19,35 @@ Beta Releases | |
destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0) | ||
}); | ||
|
||
* Renamed `options.endReferenceFrame` to `options.endTransform` in `Camera.flyTo` and `Camera.flyToRectangle`. | ||
* Renamed `Simon1994PlanetaryPositions` functions `ComputeSunPositionInEarthInertialFrame` and `ComputeMoonPositionInEarthInertialFrame` to `computeSunPositionInEarthInertialFrame` and `computeMoonPositionInEarthInertialFrame`, respectively. | ||
* Replaced `Scene.scene2D.projection` property with read-only `Scene.mapProjection`. Set this with the `mapProjection` option for the `Viewer`, `CesiumWidget`, or `Scene` constructors. | ||
* `Scene` constructor function now takes an `options` parameter instead of individual parameters. | ||
* Replaced `color`, `outlineColor`, and `outlineWidth` in `DynamicPath` with a `material` property. | ||
* 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`. | ||
* Renamed `options.endReferenceFrame` to `options.endTransform` in `Camera.flyTo` and `Camera.flyToRectangle`. | ||
* Renamed `Simon1994PlanetaryPositions` functions `ComputeSunPositionInEarthInertialFrame` and `ComputeMoonPositionInEarthInertialFrame` to `computeSunPositionInEarthInertialFrame` and `computeMoonPositionInEarthInertialFrame`, respectively. | ||
* Replaced `Scene.scene2D.projection` property with read-only `Scene.mapProjection`. Set this with the `mapProjection` option for the `Viewer`, `CesiumWidget`, or `Scene` constructors. | ||
* `Scene` constructor function now takes an `options` parameter instead of individual parameters. | ||
* Replaced `color`, `outlineColor`, and `outlineWidth` in `DynamicPath` with a `material` property. | ||
* 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`. | ||
* Refactored `JulianDate` to be in line with other Core types. | ||
* Most functions now take result parameters. | ||
* Removed `JulianDate.getJulianTimeFraction` and `JulianDate.compareTo` | ||
* `date.getJulianDayNumber()` -> `date.dayNumber` | ||
* `date.getSecondsOfDay()` -> `secondsOfDay` | ||
* `new JulianDate()` -> `JulianDate.now()` | ||
* `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)` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line is copypasted three times below. |
||
* `date.getTaiMinusUtc()` -> `JulianDate.getTaiMinusUtc(date)` | ||
* `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)` | ||
* `DynamicObject.id` can now include period characters. | ||
* `ReferenceProperty` can now handle sub-properties, for example, `myObject#billboard.scale`. | ||
* Added `Cesium.VERSION` to the combined `Cesium.js` file. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*global define*/ | ||
define(function() { | ||
"use strict"; | ||
|
||
/** | ||
* Represents a Gregorian date in a more precise format than the JavaScript Date object. | ||
* In addition to submillisecond precision, this object can also represent leap seconds. | ||
* @alias GregorianDate | ||
* @constructor | ||
* | ||
* @see JulianDate#toGregorianDate | ||
*/ | ||
var GregorianDate = function(year, month, day, hour, minute, second, millisecond, isLeapSecond) { | ||
/** | ||
* Gets or sets the year as a whole number. | ||
* @type {Number} | ||
*/ | ||
this.year = year; | ||
/** | ||
* Gets or sets the month as a whole number with range [1, 12]. | ||
* @type {Number} | ||
*/ | ||
this.month = month; | ||
/** | ||
* Gets or sets the day of the month as a whole number starting at 1. | ||
* @type {Number} | ||
*/ | ||
this.day = day; | ||
/** | ||
* Gets or sets the hour as a whole number with range [0, 23]. | ||
* @type {Number} | ||
*/ | ||
this.hour = hour; | ||
/** | ||
* Gets or sets the minute of the hour as a whole number with range [0, 59]. | ||
* @type {Number} | ||
*/ | ||
this.minute = minute; | ||
/** | ||
* Gets or sets the second of the minute as a whole number with range [0, 60], with 60 representing a leap second. | ||
* @type {Number} | ||
*/ | ||
this.second = second; | ||
/** | ||
* Gets or sets the millisecond of the second as a floating point number with range [0.0, 1000.0). | ||
* @type {Number} | ||
*/ | ||
this.millisecond = millisecond; | ||
/** | ||
* Gets or sets whether this time is during a leap second. | ||
* @type {Boolean} | ||
*/ | ||
this.isLeapSecond = isLeapSecond; | ||
}; | ||
|
||
return GregorianDate; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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