Comparing version 2.0.32 to 2.1.0
@@ -14,4 +14,5 @@ import { DateSpan } from "./DateSpan"; | ||
function toMilliseconds(value: TimeSpan, round?: Round): number; | ||
function add(value: TimeSpan, addend: TimeSpan): TimeSpan; | ||
} | ||
type Round = "round" | "floor" | "ceiling"; | ||
export {}; |
@@ -61,2 +61,6 @@ "use strict"; | ||
TimeSpan.toMilliseconds = toMilliseconds; | ||
function add(value, addend) { | ||
return Object.entries(addend).reduce((result, [key, value]) => { var _a; return Object.assign(result, { [key]: ((_a = result[key]) !== null && _a !== void 0 ? _a : 0) + value }); }, Object.assign({}, value)); | ||
} | ||
TimeSpan.add = add; | ||
})(TimeSpan || (exports.TimeSpan = TimeSpan = {})); | ||
@@ -63,0 +67,0 @@ function dateToMilliseconds(span) { |
@@ -14,4 +14,5 @@ import { DateSpan } from "./DateSpan"; | ||
function toMilliseconds(value: TimeSpan, round?: Round): number; | ||
function add(value: TimeSpan, addend: TimeSpan): TimeSpan; | ||
} | ||
type Round = "round" | "floor" | "ceiling"; | ||
export {}; |
@@ -54,2 +54,6 @@ export var TimeSpan; | ||
TimeSpan.toMilliseconds = toMilliseconds; | ||
function add(value, addend) { | ||
return Object.entries(addend).reduce((result, [key, value]) => Object.assign(result, { [key]: (result[key] ?? 0) + value }), { ...value }); | ||
} | ||
TimeSpan.add = add; | ||
})(TimeSpan || (TimeSpan = {})); | ||
@@ -56,0 +60,0 @@ function dateToMilliseconds(span) { |
{ | ||
"name": "isoly", | ||
"version": "2.0.32", | ||
"version": "2.1.0", | ||
"description": "Datatypes and functions specified by ISO-standards.", | ||
@@ -5,0 +5,0 @@ "author": "Utily Contributors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1854017
38296