@types/d3-time
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -22,6 +22,10 @@ // Type definitions for D3JS d3-time module 1.0 | ||
* | ||
* This function is idempotent: if the specified date is already floored to the current interval, a new date with an identical time is returned. | ||
* Furthermore, the returned date is the minimum expressible value of the associated interval, such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. | ||
* This function is idempotent: if the specified date is already floored to the current interval, | ||
* a new date with an identical time is returned. | ||
* Furthermore, the returned date is the minimum expressible value of the associated interval, | ||
* such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. | ||
* | ||
* Note that the == and === operators do not compare by value with Date objects, and thus you cannot use them to tell whether the specified date has already been floored. Instead, coerce to a number and then compare. | ||
* Note that the == and === operators do not compare by value with Date objects, | ||
* and thus you cannot use them to tell whether the specified date has already been floored. | ||
* Instead, coerce to a number and then compare. | ||
* | ||
@@ -39,6 +43,10 @@ * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. | ||
* | ||
* This method is idempotent: if the specified date is already floored to the current interval, a new date with an identical time is returned. | ||
* Furthermore, the returned date is the minimum expressible value of the associated interval, such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. | ||
* This method is idempotent: if the specified date is already floored to the current interval, | ||
* a new date with an identical time is returned. | ||
* Furthermore, the returned date is the minimum expressible value of the associated interval, | ||
* such that interval.floor(interval.floor(date) - 1) returns the preceeding interval boundary date. | ||
* | ||
* Note that the == and === operators do not compare by value with Date objects, and thus you cannot use them to tell whether the specified date has already been floored. Instead, coerce to a number and then compare. | ||
* Note that the == and === operators do not compare by value with Date objects, | ||
* and thus you cannot use them to tell whether the specified date has already been floored. | ||
* Instead, coerce to a number and then compare. | ||
* | ||
@@ -68,4 +76,6 @@ * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. | ||
* | ||
* This method is idempotent: if the specified date is already ceilinged to the current interval, a new date with an identical time is returned. Furthermore, | ||
* the returned date is the maximum expressible value of the associated interval, such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date. | ||
* This method is idempotent: if the specified date is already ceilinged to the current interval, | ||
* a new date with an identical time is returned. Furthermore, | ||
* the returned date is the maximum expressible value of the associated interval, | ||
* such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date. | ||
* | ||
@@ -85,3 +95,4 @@ * @param date A date object. | ||
* @param date A date object. | ||
* @param step An optional number of steps to apply when calculating the offset date. If step is negative, then the returned date will be before the specified date; | ||
* @param step An optional number of steps to apply when calculating the offset date. | ||
* If step is negative, then the returned date will be before the specified date; | ||
* if step is zero, then a copy of the specified date is returned; if step is not an integer, it is floored. | ||
@@ -94,6 +105,8 @@ */ | ||
* | ||
* If step is specified, then every step-th boundary will be returned; for example, for the timeDay interval a step of 2 will return every other day. | ||
* If step is specified, then every step-th boundary will be returned; for example, | ||
* for the timeDay interval a step of 2 will return every other day. | ||
* If step is not an integer, it is floored. | ||
* | ||
* The first date in the returned array is the earliest boundary after or equal to start; subsequent dates are offset by step intervals and floored. | ||
* The first date in the returned array is the earliest boundary after or equal to start; | ||
* subsequent dates are offset by step intervals and floored. | ||
* Thus, two overlapping ranges may be inconsistent. | ||
@@ -112,3 +125,4 @@ * | ||
* | ||
* @param test A test function which is passed a date and should return true if and only if the specified date should be considered part of the interval. | ||
* @param test A test function which is passed a date and should return true if and only if | ||
* the specified date should be considered part of the interval. | ||
*/ | ||
@@ -138,3 +152,4 @@ filter(test: (date: Date) => boolean): TimeInterval; | ||
* For example, timeMinute.every(15) returns an interval representing every fifteen minutes, | ||
* starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, the resulting dates may not be uniformly-spaced; | ||
* starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, | ||
* the resulting dates may not be uniformly-spaced; | ||
* timeDay’s parent interval is timeMonth, and thus the interval number resets at the start of each month. | ||
@@ -161,3 +176,4 @@ * | ||
* @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. | ||
* @param offset An offset function which takes a date and an integer step as arguments and advances the specified date by the specified number of boundaries; the step may be positive, negative or zero. | ||
* @param offset An offset function which takes a date and an integer step as arguments and advances | ||
* the specified date by the specified number of boundaries; the step may be positive, negative or zero. | ||
*/ | ||
@@ -176,9 +192,13 @@ export function timeInterval( | ||
* @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. | ||
* @param offset An offset function which takes a date and an integer step as arguments and advances the specified date by the specified number of boundaries; the step may be positive, negative or zero. | ||
* @param count A count function which takes a start date and an end date, already floored to the current interval, and returns the number of boundaries between the start (exclusive) and end (inclusive). | ||
* @param offset An offset function which takes a date and an integer step as arguments and advances | ||
* the specified date by the specified number of boundaries; the step may be positive, negative or zero. | ||
* @param count A count function which takes a start date and an end date, already floored to the current interval, | ||
* and returns the number of boundaries between the start (exclusive) and end (inclusive). | ||
* Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals. | ||
* @param field An optional field function which takes a date, already floored to the current interval, and returns the field value of the specified date, | ||
* @param field An optional field function which takes a date, already floored to the current interval, | ||
* and returns the field value of the specified date, | ||
* corresponding to the number of boundaries between this date (exclusive) and the latest previous parent boundary. | ||
* For example, for the timeDay interval, this returns the number of days since the start of the month. If a field function is not specified, | ||
* it defaults to counting the number of interval boundaries since the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every. | ||
* For example, for the timeDay interval, this returns the number of days since the start of the month. | ||
* If a field function is not specified, it defaults to counting the number of interval boundaries since | ||
* the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every. | ||
*/ | ||
@@ -196,3 +216,2 @@ export function timeInterval( | ||
// local time ---------------------------------------------------------- | ||
@@ -203,3 +222,3 @@ | ||
*/ | ||
export var timeMillisecond: CountableTimeInterval; | ||
export const timeMillisecond: CountableTimeInterval; | ||
@@ -218,3 +237,3 @@ /** | ||
*/ | ||
export var timeSecond: CountableTimeInterval; | ||
export const timeSecond: CountableTimeInterval; | ||
@@ -233,3 +252,3 @@ /** | ||
*/ | ||
export var timeMinute: CountableTimeInterval; | ||
export const timeMinute: CountableTimeInterval; | ||
@@ -250,3 +269,3 @@ /** | ||
*/ | ||
export var timeHour: CountableTimeInterval; | ||
export const timeHour: CountableTimeInterval; | ||
@@ -266,3 +285,3 @@ /** | ||
*/ | ||
export var timeDay: CountableTimeInterval; | ||
export const timeDay: CountableTimeInterval; | ||
@@ -283,3 +302,3 @@ /** | ||
*/ | ||
export var timeWeek: CountableTimeInterval; | ||
export const timeWeek: CountableTimeInterval; | ||
@@ -301,3 +320,3 @@ /** | ||
*/ | ||
export var timeSunday: CountableTimeInterval; | ||
export const timeSunday: CountableTimeInterval; | ||
@@ -319,3 +338,3 @@ /** | ||
*/ | ||
export var timeMonday: CountableTimeInterval; | ||
export const timeMonday: CountableTimeInterval; | ||
@@ -337,3 +356,3 @@ /** | ||
*/ | ||
export var timeTuesday: CountableTimeInterval; | ||
export const timeTuesday: CountableTimeInterval; | ||
@@ -355,3 +374,3 @@ /** | ||
*/ | ||
export var timeWednesday: CountableTimeInterval; | ||
export const timeWednesday: CountableTimeInterval; | ||
@@ -373,3 +392,3 @@ /** | ||
*/ | ||
export var timeThursday: CountableTimeInterval; | ||
export const timeThursday: CountableTimeInterval; | ||
@@ -391,5 +410,4 @@ /** | ||
*/ | ||
export var timeFriday: CountableTimeInterval; | ||
export const timeFriday: CountableTimeInterval; | ||
/** | ||
@@ -410,3 +428,3 @@ * This is a convenience alias for timeFriday.range(...). | ||
*/ | ||
export var timeSaturday: CountableTimeInterval; | ||
export const timeSaturday: CountableTimeInterval; | ||
@@ -425,3 +443,3 @@ /** | ||
*/ | ||
export var timeMonth: CountableTimeInterval; | ||
export const timeMonth: CountableTimeInterval; | ||
@@ -440,3 +458,3 @@ /** | ||
*/ | ||
export var timeYear: CountableTimeInterval; | ||
export const timeYear: CountableTimeInterval; | ||
@@ -452,3 +470,2 @@ /** | ||
// utc Universal Coordinated Time ---------------------------------------------------------- | ||
@@ -459,3 +476,3 @@ | ||
*/ | ||
export var utcMillisecond: CountableTimeInterval; | ||
export const utcMillisecond: CountableTimeInterval; | ||
@@ -474,3 +491,3 @@ /** | ||
*/ | ||
export var utcSecond: CountableTimeInterval; | ||
export const utcSecond: CountableTimeInterval; | ||
@@ -487,5 +504,6 @@ /** | ||
/** | ||
* Minutes Interval in Univarsal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript ignores leap seconds. | ||
* Minutes Interval in Univarsal Coordinated Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. | ||
* Note that ECMAScript ignores leap seconds. | ||
*/ | ||
export var utcMinute: CountableTimeInterval; | ||
export const utcMinute: CountableTimeInterval; | ||
@@ -504,3 +522,3 @@ /** | ||
*/ | ||
export var utcHour: CountableTimeInterval; | ||
export const utcHour: CountableTimeInterval; | ||
@@ -519,3 +537,3 @@ /** | ||
*/ | ||
export var utcDay: CountableTimeInterval; | ||
export const utcDay: CountableTimeInterval; | ||
@@ -535,3 +553,3 @@ /** | ||
*/ | ||
export var utcWeek: CountableTimeInterval; | ||
export const utcWeek: CountableTimeInterval; | ||
@@ -551,3 +569,3 @@ /** | ||
*/ | ||
export var utcSunday: CountableTimeInterval; | ||
export const utcSunday: CountableTimeInterval; | ||
@@ -567,3 +585,3 @@ /** | ||
*/ | ||
export var utcMonday: CountableTimeInterval; | ||
export const utcMonday: CountableTimeInterval; | ||
@@ -583,3 +601,3 @@ /** | ||
*/ | ||
export var utcTuesday: CountableTimeInterval; | ||
export const utcTuesday: CountableTimeInterval; | ||
@@ -599,3 +617,3 @@ /** | ||
*/ | ||
export var utcWednesday: CountableTimeInterval; | ||
export const utcWednesday: CountableTimeInterval; | ||
@@ -615,3 +633,3 @@ /** | ||
*/ | ||
export var utcThursday: CountableTimeInterval; | ||
export const utcThursday: CountableTimeInterval; | ||
@@ -631,3 +649,3 @@ /** | ||
*/ | ||
export var utcFriday: CountableTimeInterval; | ||
export const utcFriday: CountableTimeInterval; | ||
@@ -647,3 +665,3 @@ /** | ||
*/ | ||
export var utcSaturday: CountableTimeInterval; | ||
export const utcSaturday: CountableTimeInterval; | ||
@@ -662,3 +680,3 @@ /** | ||
*/ | ||
export var utcMonth: CountableTimeInterval; | ||
export const utcMonth: CountableTimeInterval; | ||
@@ -677,3 +695,3 @@ /** | ||
*/ | ||
export var utcYear: CountableTimeInterval; | ||
export const utcYear: CountableTimeInterval; | ||
@@ -680,0 +698,0 @@ /** |
{ | ||
"name": "@types/d3-time", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "TypeScript definitions for D3JS d3-time module", | ||
"license": "MIT", | ||
"author": "Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>", | ||
"contributors": [ | ||
{ | ||
"name": "Tom Wanzek", | ||
"url": "https://github.com/tomwanzek" | ||
}, | ||
{ | ||
"name": "Alex Ford", | ||
"url": "https://github.com/gustavderdrache" | ||
}, | ||
{ | ||
"name": "Boris Yankov", | ||
"url": "https://github.com/borisyankov" | ||
} | ||
], | ||
"main": "", | ||
@@ -15,3 +28,4 @@ "repository": { | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "7d3513aa4c60a9066c073079fa30f95e6dbf4272ed534781dea8bfabe4d88adc" | ||
"typesPublisherContentHash": "9c2ff16ccb9c301ed387a91700655eb01c7626e7994b2959c70dfff5e2d0d260", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,8 +8,7 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/d3-time | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time | ||
Additional Details | ||
* Last updated: Wed, 07 Dec 2016 15:03:49 GMT | ||
* Library Dependencies: none | ||
* Module Dependencies: none | ||
* Last updated: Fri, 19 May 2017 15:49:31 GMT | ||
* Dependencies: none | ||
* Global values: none | ||
@@ -16,0 +15,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29995
589
0
17