-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1821 from AnalyticalGraphicsInc/refactor-julianDate
Refactor julian date
- Loading branch information
Showing
73 changed files
with
1,237 additions
and
1,737 deletions.
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
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.