@tsdotnet/date-time 1.0.23 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +11 -11
  3. package/dist/Calendars/Gregorian.d.ts +37 -37
  4. package/dist/ClockTime.d.ts +20 -20
  5. package/dist/ClockTime.js +67 -67
  6. package/dist/ClockTime.js.map +1 -1
  7. package/dist/DateTime.d.ts +154 -154
  8. package/dist/DateTime.js +305 -305
  9. package/dist/DateTime.js.map +1 -1
  10. package/dist/TimeQuantity.d.ts +50 -50
  11. package/dist/TimeQuantity.js +95 -95
  12. package/dist/TimeQuantity.js.map +1 -1
  13. package/dist/TimeSpan.d.ts +73 -73
  14. package/dist/TimeSpan.js +111 -111
  15. package/dist/TimeSpan.js.map +1 -1
  16. package/dist/TimeStamp.d.ts +25 -25
  17. package/dist/TimeStamp.js +45 -45
  18. package/dist/TimeStamp.js.map +1 -1
  19. package/dist/TimeUnit.d.ts +47 -47
  20. package/dist/TimeUnit.js +99 -99
  21. package/dist/TimeUnitValue.d.ts +19 -19
  22. package/dist/TimeUnitValue.js +46 -46
  23. package/dist/TimeUnitValue.js.map +1 -1
  24. package/dist/date-time.d.ts +20 -14
  25. package/dist/date-time.js +24 -24
  26. package/dist/date-time.js.map +1 -1
  27. package/dist-esm/ClockTime.js +62 -62
  28. package/dist-esm/ClockTime.js.map +1 -1
  29. package/dist-esm/DateTime.js +301 -301
  30. package/dist-esm/TimeQuantity.js +91 -91
  31. package/dist-esm/TimeSpan.js +106 -106
  32. package/dist-esm/TimeStamp.js +40 -40
  33. package/dist-esm/TimeUnit.js +96 -96
  34. package/dist-esm/TimeUnitValue.js +42 -42
  35. package/dist-esm/date-time.js +13 -13
  36. package/dist-esm/date-time.js.map +1 -1
  37. package/package.json +62 -62
  38. package/dist/CalendarDate.d.ts +0 -12
  39. package/dist/ClockTimeValue.d.ts +0 -14
  40. package/dist/DateTimeKind.d.ts +0 -15
  41. package/dist/JsDateConvertable.d.ts +0 -10
  42. package/dist/TimeMeasurement.d.ts +0 -15
  43. package/dist/TimeStampValue.d.ts +0 -13
  44. package/dist/howMany.d.ts +0 -59
@@ -1,97 +1,97 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * Originally based upon .NET source but with many additions and improvements.
4
- * @license MIT
5
- */
6
- /* eslint-disable no-fallthrough */
7
- export var TimeUnit;
8
- (function (TimeUnit) {
9
- /**
10
- * A distinct unit of time measurement.
11
- */
12
- let UnitType;
13
- (function (UnitType) {
14
- UnitType[UnitType["Ticks"] = 0] = "Ticks";
15
- UnitType[UnitType["Milliseconds"] = 1] = "Milliseconds";
16
- UnitType[UnitType["Seconds"] = 2] = "Seconds";
17
- UnitType[UnitType["Minutes"] = 3] = "Minutes";
18
- UnitType[UnitType["Hours"] = 4] = "Hours";
19
- UnitType[UnitType["Days"] = 5] = "Days";
20
- })(UnitType = TimeUnit.UnitType || (TimeUnit.UnitType = {})); // Earth Days
21
- /**
22
- * Converts any TimeUnit value to it's respective millisecond quantity.
23
- * @param {number} value
24
- * @param {UnitType} units
25
- * @return {number} Number of milliseconds representing the specified units.
26
- */
27
- function toMilliseconds(value, units) {
28
- // noinspection FallThroughInSwitchStatementJS
29
- switch (units) {
30
- case UnitType.Days:
31
- value *= 24 /* day */;
32
- case UnitType.Hours:
33
- value *= 60 /* hour */;
34
- case UnitType.Minutes:
35
- value *= 60 /* minute */;
36
- case UnitType.Seconds:
37
- value *= 1000 /* second */;
38
- case UnitType.Milliseconds:
39
- return value;
40
- case UnitType.Ticks:
41
- return value / 10000 /* millisecond */;
42
- default:
43
- throw new Error('Invalid TimeUnit.');
44
- }
45
- }
46
- TimeUnit.toMilliseconds = toMilliseconds;
47
- /**
48
- * Converts milliseconds to the specified TimeUnit quantity.
49
- * @param {number} ms
50
- * @param {UnitType} units
51
- * @return {number}
52
- */
53
- function fromMilliseconds(ms, units) {
54
- switch (units) {
55
- case UnitType.Days:
56
- return ms / 86400000 /* day */;
57
- case UnitType.Hours:
58
- return ms / 3600000 /* hour */;
59
- case UnitType.Minutes:
60
- return ms / 60000 /* minute */;
61
- case UnitType.Seconds:
62
- return ms / 1000 /* second */;
63
- case UnitType.Milliseconds:
64
- return ms;
65
- case UnitType.Ticks:
66
- return ms * 10000 /* millisecond */;
67
- default:
68
- throw new Error('Invalid TimeUnit.');
69
- }
70
- }
71
- TimeUnit.fromMilliseconds = fromMilliseconds;
72
- /**
73
- * Converts a TimeQuantity to the the TimeUnit requested..
74
- * @param {TimeQuantity} quantity
75
- * @param {UnitType} toUnits
76
- * @return {number}
77
- */
78
- function from(quantity, toUnits) {
79
- return quantity && fromMilliseconds(quantity.getTotalMilliseconds(), toUnits);
80
- }
81
- TimeUnit.from = from;
82
- /**
83
- * Asserts if the time unit value is valid.
84
- * @param {UnitType} unit
85
- * @return {true}
86
- */
87
- function assertValid(unit) {
88
- if (isNaN(unit) || unit > UnitType.Days || unit < UnitType.Ticks || Math.floor(unit) !== unit)
89
- throw new Error('Invalid TimeUnit.');
90
- return true;
91
- }
92
- TimeUnit.assertValid = assertValid;
93
- })(TimeUnit || (TimeUnit = {}));
94
- Object.freeze(TimeUnit.UnitType);
95
- Object.freeze(TimeUnit);
96
- export default TimeUnit;
1
+ /*!
2
+ * @author electricessence / https://github.com/electricessence/
3
+ * Originally based upon .NET source but with many additions and improvements.
4
+ * @license MIT
5
+ */
6
+ /* eslint-disable no-fallthrough */
7
+ export var TimeUnit;
8
+ (function (TimeUnit) {
9
+ /**
10
+ * A distinct unit of time measurement.
11
+ */
12
+ let UnitType;
13
+ (function (UnitType) {
14
+ UnitType[UnitType["Ticks"] = 0] = "Ticks";
15
+ UnitType[UnitType["Milliseconds"] = 1] = "Milliseconds";
16
+ UnitType[UnitType["Seconds"] = 2] = "Seconds";
17
+ UnitType[UnitType["Minutes"] = 3] = "Minutes";
18
+ UnitType[UnitType["Hours"] = 4] = "Hours";
19
+ UnitType[UnitType["Days"] = 5] = "Days";
20
+ })(UnitType = TimeUnit.UnitType || (TimeUnit.UnitType = {})); // Earth Days
21
+ /**
22
+ * Converts any TimeUnit value to it's respective millisecond quantity.
23
+ * @param {number} value
24
+ * @param {UnitType} units
25
+ * @return {number} Number of milliseconds representing the specified units.
26
+ */
27
+ function toMilliseconds(value, units) {
28
+ // noinspection FallThroughInSwitchStatementJS
29
+ switch (units) {
30
+ case UnitType.Days:
31
+ value *= 24 /* day */;
32
+ case UnitType.Hours:
33
+ value *= 60 /* hour */;
34
+ case UnitType.Minutes:
35
+ value *= 60 /* minute */;
36
+ case UnitType.Seconds:
37
+ value *= 1000 /* second */;
38
+ case UnitType.Milliseconds:
39
+ return value;
40
+ case UnitType.Ticks:
41
+ return value / 10000 /* millisecond */;
42
+ default:
43
+ throw new Error('Invalid TimeUnit.');
44
+ }
45
+ }
46
+ TimeUnit.toMilliseconds = toMilliseconds;
47
+ /**
48
+ * Converts milliseconds to the specified TimeUnit quantity.
49
+ * @param {number} ms
50
+ * @param {UnitType} units
51
+ * @return {number}
52
+ */
53
+ function fromMilliseconds(ms, units) {
54
+ switch (units) {
55
+ case UnitType.Days:
56
+ return ms / 86400000 /* day */;
57
+ case UnitType.Hours:
58
+ return ms / 3600000 /* hour */;
59
+ case UnitType.Minutes:
60
+ return ms / 60000 /* minute */;
61
+ case UnitType.Seconds:
62
+ return ms / 1000 /* second */;
63
+ case UnitType.Milliseconds:
64
+ return ms;
65
+ case UnitType.Ticks:
66
+ return ms * 10000 /* millisecond */;
67
+ default:
68
+ throw new Error('Invalid TimeUnit.');
69
+ }
70
+ }
71
+ TimeUnit.fromMilliseconds = fromMilliseconds;
72
+ /**
73
+ * Converts a TimeQuantity to the the TimeUnit requested..
74
+ * @param {TimeQuantity} quantity
75
+ * @param {UnitType} toUnits
76
+ * @return {number}
77
+ */
78
+ function from(quantity, toUnits) {
79
+ return quantity && fromMilliseconds(quantity.getTotalMilliseconds(), toUnits);
80
+ }
81
+ TimeUnit.from = from;
82
+ /**
83
+ * Asserts if the time unit value is valid.
84
+ * @param {UnitType} unit
85
+ * @return {true}
86
+ */
87
+ function assertValid(unit) {
88
+ if (isNaN(unit) || unit > UnitType.Days || unit < UnitType.Ticks || Math.floor(unit) !== unit)
89
+ throw new Error('Invalid TimeUnit.');
90
+ return true;
91
+ }
92
+ TimeUnit.assertValid = assertValid;
93
+ })(TimeUnit || (TimeUnit = {}));
94
+ Object.freeze(TimeUnit.UnitType);
95
+ Object.freeze(TimeUnit);
96
+ export default TimeUnit;
97
97
  //# sourceMappingURL=TimeUnit.js.map
@@ -1,43 +1,43 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
- import TimeQuantity from './TimeQuantity';
6
- import TimeUnit from './TimeUnit';
7
- /**
8
- * TimeUnitValue allows for passing around a reference to a mutable measure of time coerced by its unit type.
9
- */
10
- export default class TimeUnitValue extends TimeQuantity {
11
- constructor(value, _units) {
12
- super(typeof value == 'number'
13
- ? value
14
- : getUnitQuantityFrom(value, _units));
15
- this._units = _units;
16
- TimeUnit.assertValid(_units);
17
- }
18
- get value() {
19
- return this._quantity;
20
- }
21
- set value(v) {
22
- this._quantity = v;
23
- if (!this._total.tryReset())
24
- throw new Error('Unable to update underlying value.');
25
- }
26
- // To avoid confusion, the unit type can only be set once at construction.
27
- get units() {
28
- return this._units;
29
- }
30
- static from(value, units = TimeUnit.UnitType.Milliseconds) {
31
- return new TimeUnitValue(value, units);
32
- }
33
- getTotalMilliseconds() {
34
- return TimeUnit.toMilliseconds(this._quantity, this._units);
35
- }
36
- to(units = this.units) {
37
- return TimeUnitValue.from(this, units);
38
- }
39
- }
40
- function getUnitQuantityFrom(q, units) {
41
- return TimeUnit.fromMilliseconds(q.getTotalMilliseconds(), units);
42
- }
1
+ /*!
2
+ * @author electricessence / https://github.com/electricessence/
3
+ * @license MIT
4
+ */
5
+ import TimeQuantity from './TimeQuantity';
6
+ import TimeUnit from './TimeUnit';
7
+ /**
8
+ * TimeUnitValue allows for passing around a reference to a mutable measure of time coerced by its unit type.
9
+ */
10
+ export default class TimeUnitValue extends TimeQuantity {
11
+ constructor(value, _units) {
12
+ super(typeof value == 'number'
13
+ ? value
14
+ : getUnitQuantityFrom(value, _units));
15
+ this._units = _units;
16
+ TimeUnit.assertValid(_units);
17
+ }
18
+ get value() {
19
+ return this._quantity;
20
+ }
21
+ set value(v) {
22
+ this._quantity = v;
23
+ if (!this._total.tryReset())
24
+ throw new Error('Unable to update underlying value.');
25
+ }
26
+ // To avoid confusion, the unit type can only be set once at construction.
27
+ get units() {
28
+ return this._units;
29
+ }
30
+ static from(value, units = TimeUnit.UnitType.Milliseconds) {
31
+ return new TimeUnitValue(value, units);
32
+ }
33
+ getTotalMilliseconds() {
34
+ return TimeUnit.toMilliseconds(this._quantity, this._units);
35
+ }
36
+ to(units = this.units) {
37
+ return TimeUnitValue.from(this, units);
38
+ }
39
+ }
40
+ function getUnitQuantityFrom(q, units) {
41
+ return TimeUnit.fromMilliseconds(q.getTotalMilliseconds(), units);
42
+ }
43
43
  //# sourceMappingURL=TimeUnitValue.js.map
@@ -1,14 +1,14 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
- import ClockTime from './ClockTime';
6
- import DateTime from './DateTime';
7
- import * as howMany from './howMany';
8
- import TimeQuantity from './TimeQuantity';
9
- import TimeSpan from './TimeSpan';
10
- import TimeStamp from './TimeStamp';
11
- import TimeUnit from './TimeUnit';
12
- import TimeUnitValue from './TimeUnitValue';
13
- export { ClockTime, DateTime, howMany, TimeQuantity, TimeSpan, TimeStamp, TimeUnit, TimeUnitValue };
1
+ /*!
2
+ * @author electricessence / https://github.com/electricessence/
3
+ * @license MIT
4
+ */
5
+ import ClockTime from './ClockTime';
6
+ import DateTime from './DateTime';
7
+ import * as howMany from './howMany';
8
+ import TimeQuantity from './TimeQuantity';
9
+ import TimeSpan from './TimeSpan';
10
+ import TimeStamp from './TimeStamp';
11
+ import TimeUnit from './TimeUnit';
12
+ import TimeUnitValue from './TimeUnitValue';
13
+ export { ClockTime, DateTime, howMany, TimeQuantity, TimeSpan, TimeStamp, TimeUnit, TimeUnitValue };
14
14
  //# sourceMappingURL=date-time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-time.js","sourceRoot":"","sources":["../src/date-time.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAEN,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,CAAC"}
1
+ {"version":3,"file":"date-time.js","sourceRoot":"","sources":["../src/date-time.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAGN,SAAS,EAET,QAAQ,EAER,OAAO,EAEP,YAAY,EACZ,QAAQ,EACR,SAAS,EAET,QAAQ,EACR,aAAa,EAEb,CAAC"}
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
- {
2
- "name": "@tsdotnet/date-time",
3
- "version": "1.0.23",
4
- "description": "",
5
- "author": "electricessence",
6
- "license": "MIT",
7
- "types": "dist/date-time.d.ts",
8
- "main": "dist/date-time.js",
9
- "module": "dist-esm/date-time.js",
10
- "keywords": [],
11
- "scripts": {
12
- "build:dist": "rimraf dist/* && tsc && copyfiles -u 1 src/**/*.d.ts dist",
13
- "build:dist-esm": "rimraf dist-esm/* && tsc -p tsconfig.esm.json",
14
- "build": "pnpm i && run-p build:*",
15
- "bump": "npm run precommit && npm version patch",
16
- "docs": "rimraf docs/* && rimraf docs/.nojekyll && typedoc --options typedoc.json --readme none",
17
- "lint": "eslint src/**/*.ts",
18
- "precommit": "pnpm i && run-p lint test && run-p build:* && npm run validate && git status -s",
19
- "prepublishOnly": "npm run build && run-p validate test",
20
- "preversion": "run-p lint test",
21
- "postversion": "git push && git push --tags && npm run docs && git commit -m \"Updated docs.\" docs && git push",
22
- "test": "mocha -r ts-node/register tests/**/*.ts",
23
- "validate": "node ./.build/validate-package.js"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/tsdotnet/date-time.git"
28
- },
29
- "bugs": {
30
- "url": "https://github.com/tsdotnet/date-time/issues"
31
- },
32
- "homepage": "https://github.com/tsdotnet/date-time#readme",
33
- "devDependencies": {
34
- "@tsdotnet/random": "^1.0.13",
35
- "@types/chai": "^4.2.16",
36
- "@types/mocha": "^8.2.2",
37
- "@typescript-eslint/eslint-plugin": "^4.22.0",
38
- "@typescript-eslint/parser": "^4.22.0",
39
- "chai": "^4.3.4",
40
- "copyfiles": "^2.4.1",
41
- "eslint": "^7.24.0",
42
- "eslint-config-typescript": "^3.0.0",
43
- "eslint-plugin-import": "^2.22.1",
44
- "eslint-plugin-node": "^11.1.0",
45
- "eslint-plugin-promise": "^5.1.0",
46
- "mocha": "^8.3.2",
47
- "npm-run-all": "^4.1.5",
48
- "nyc": "^15.1.0",
49
- "rimraf": "^3.0.2",
50
- "ts-node": "^9.1.1",
51
- "typedoc-plugin-nojekyll": "^1.0.1",
52
- "typedoc": "^0.20.35",
53
- "typescript": "^4.2.4"
54
- },
55
- "dependencies": {
56
- "@tsdotnet/compare": "^1.3.17",
57
- "@tsdotnet/exceptions": "^1.0.17",
58
- "@tsdotnet/lazy": "^1.0.22",
59
- "@tsdotnet/type": "^1.0.11",
60
- "tslib": "^2.2.0"
61
- }
62
- }
1
+ {
2
+ "name": "@tsdotnet/date-time",
3
+ "version": "1.0.27",
4
+ "description": "",
5
+ "author": "electricessence",
6
+ "license": "MIT",
7
+ "types": "dist/date-time.d.ts",
8
+ "main": "dist/date-time.js",
9
+ "module": "dist-esm/date-time.js",
10
+ "keywords": [],
11
+ "scripts": {
12
+ "build:dist": "rimraf dist/* && tsc && copyfiles -u 1 src/**/*.d.ts dist",
13
+ "build:dist-esm": "rimraf dist-esm/* && tsc -p tsconfig.esm.json",
14
+ "build": "pnpm i && pnpm run build:dist && pnpm run build:dist-esm",
15
+ "bump": "npm run-script precommit && npm version patch",
16
+ "docs": "rimraf docs/* && typedoc --options typedoc.json --readme none",
17
+ "lint": "eslint src/**/*.ts",
18
+ "precommit": "pnpm i && run-p lint test && run-p build:* && npm run-script validate && git status -s",
19
+ "prepublishOnly": "npm run-script build && run-p validate test",
20
+ "preversion": "run-p lint test",
21
+ "postversion": "git push && git push --tags && npm run-script docs && git commit -m \"Updated docs.\" docs && git push",
22
+ "test": "mocha -r ts-node/register tests/**/*.ts",
23
+ "validate": "node ./.build/validate-package.js"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/tsdotnet/date-time.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/tsdotnet/date-time/issues"
31
+ },
32
+ "homepage": "https://github.com/tsdotnet/date-time#readme",
33
+ "devDependencies": {
34
+ "@tsdotnet/random": "^1.0.15",
35
+ "@types/chai": "^4.3.0",
36
+ "@types/mocha": "^9.1.0",
37
+ "@types/node": "^17.0.17",
38
+ "@typescript-eslint/eslint-plugin": "^5.11.0",
39
+ "@typescript-eslint/parser": "^5.11.0",
40
+ "chai": "^4.3.6",
41
+ "copyfiles": "^2.4.1",
42
+ "eslint": "^8.9.0",
43
+ "eslint-config-typescript": "^3.0.0",
44
+ "eslint-plugin-import": "^2.25.4",
45
+ "eslint-plugin-node": "^11.1.0",
46
+ "eslint-plugin-promise": "^6.0.0",
47
+ "mocha": "^9.2.0",
48
+ "npm-run-all": "^4.1.5",
49
+ "nyc": "^15.1.0",
50
+ "rimraf": "^3.0.2",
51
+ "ts-node": "^10.5.0",
52
+ "typedoc": "^0.22.11",
53
+ "typescript": "^4.5.5"
54
+ },
55
+ "dependencies": {
56
+ "@tsdotnet/compare": "^1.3.21",
57
+ "@tsdotnet/exceptions": "^1.0.18",
58
+ "@tsdotnet/lazy": "^1.0.24",
59
+ "@tsdotnet/type": "^1.0.13",
60
+ "tslib": "^2.3.1"
61
+ }
62
+ }
@@ -1,12 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
- export default interface CalendarDate
8
- {
9
- year: number;
10
- month: number;
11
- day: number;
12
- }
@@ -1,14 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
- export default interface ClockTimeValue
8
- {
9
- hour: number;
10
- minute: number;
11
- second?: number;
12
- millisecond?: number;
13
- tick?: number;
14
- }
@@ -1,15 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
-
8
- declare const enum DateTimeKind
9
- {
10
- Unspecified,
11
- Local,
12
- Utc,
13
- }
14
-
15
- export default DateTimeKind;
@@ -1,10 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
- export default interface JsDateConvertible
8
- {
9
- toJsDate (): Date;
10
- }
@@ -1,15 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
- export default interface TimeMeasurement
8
- {
9
- ticks: number;
10
- milliseconds: number;
11
- seconds: number;
12
- minutes: number;
13
- hours: number;
14
- days: number;
15
- }
@@ -1,13 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
- import CalendarDate from './CalendarDate';
7
- import ClockTimeValue from './ClockTimeValue';
8
-
9
- export interface TimeStampValue
10
- extends CalendarDate, Partial<ClockTimeValue>
11
- {
12
-
13
- }
package/dist/howMany.d.ts DELETED
@@ -1,59 +0,0 @@
1
- /*!
2
- * @author electricessence / https://github.com/electricessence/
3
- * @license MIT
4
- */
5
-
6
-
7
- export declare namespace hours
8
- {
9
- export const enum per
10
- {
11
- day = 24
12
- }
13
- }
14
-
15
- export declare namespace minutes
16
- {
17
- export const enum per
18
- {
19
- hour = 60,
20
- day = hour*hours.per.day
21
- }
22
-
23
- }
24
-
25
- export declare namespace seconds
26
- {
27
- export const enum per
28
- {
29
- minute = 60,
30
- hour = minute*minutes.per.hour,
31
- day = hour*hours.per.day
32
- }
33
-
34
- }
35
-
36
- export declare namespace milliseconds
37
- {
38
- export const enum per
39
- {
40
- second = 1000,
41
- minute = second*seconds.per.minute,
42
- hour = minute*minutes.per.hour,
43
- day = hour*hours.per.day
44
- }
45
-
46
- }
47
-
48
- export declare namespace ticks
49
- {
50
- export const enum per
51
- {
52
- millisecond = 10000,
53
- second = millisecond*milliseconds.per.second,
54
- minute = second*seconds.per.minute,
55
- hour = minute*minutes.per.hour,
56
- day = hour*hours.per.day
57
- }
58
-
59
- }