date-vir 0.7.0 → 0.8.0
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNowInIsoString = void 0;
|
|
4
|
+
const create_full_date_1 = require("../full-date/create-full-date");
|
|
5
|
+
const primitive_conversions_1 = require("../full-date/primitive-conversions");
|
|
6
|
+
const timezones_1 = require("../timezone/timezones");
|
|
7
|
+
function getNowInIsoString() {
|
|
8
|
+
/**
|
|
9
|
+
* The time zone doesn't matter here because the ISO string will be identical for a given date
|
|
10
|
+
* no matter what its timezone is.
|
|
11
|
+
*/
|
|
12
|
+
return (0, primitive_conversions_1.toIsoString)((0, create_full_date_1.getNowFullDate)(timezones_1.utcTimezone));
|
|
13
|
+
}
|
|
14
|
+
exports.getNowInIsoString = getNowInIsoString;
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./date-operations/calculate-relative-date"), exports);
|
|
18
18
|
__exportStar(require("./date-operations/combine-dates"), exports);
|
|
19
19
|
__exportStar(require("./date-operations/diff-dates"), exports);
|
|
20
|
+
__exportStar(require("./extra-utils/now-in-iso-string"), exports);
|
|
20
21
|
__exportStar(require("./full-date/create-full-date"), exports);
|
|
21
22
|
__exportStar(require("./full-date/date-like"), exports);
|
|
22
23
|
__exportStar(require("./full-date/date-transforms"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getNowFullDate } from '../full-date/create-full-date';
|
|
2
|
+
import { toIsoString } from '../full-date/primitive-conversions';
|
|
3
|
+
import { utcTimezone } from '../timezone/timezones';
|
|
4
|
+
export function getNowInIsoString() {
|
|
5
|
+
/**
|
|
6
|
+
* The time zone doesn't matter here because the ISO string will be identical for a given date
|
|
7
|
+
* no matter what its timezone is.
|
|
8
|
+
*/
|
|
9
|
+
return toIsoString(getNowFullDate(utcTimezone));
|
|
10
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './date-operations/calculate-relative-date';
|
|
2
2
|
export * from './date-operations/combine-dates';
|
|
3
3
|
export * from './date-operations/diff-dates';
|
|
4
|
+
export * from './extra-utils/now-in-iso-string';
|
|
4
5
|
export * from './full-date/create-full-date';
|
|
5
6
|
export * from './full-date/date-like';
|
|
6
7
|
export * from './full-date/date-transforms';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './date-operations/calculate-relative-date';
|
|
2
2
|
export * from './date-operations/combine-dates';
|
|
3
3
|
export * from './date-operations/diff-dates';
|
|
4
|
+
export * from './extra-utils/now-in-iso-string';
|
|
4
5
|
export * from './full-date/create-full-date';
|
|
5
6
|
export * from './full-date/date-like';
|
|
6
7
|
export * from './full-date/date-transforms';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "date-vir",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Easy and explicit dates and times",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"date",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"test:watch": "web-test-runner --watch --color --config configs/web-test-runner.config.mjs"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@augment-vir/common": "^16.
|
|
43
|
+
"@augment-vir/common": "^16.3.0",
|
|
44
44
|
"@types/luxon": "^3.3.1",
|
|
45
|
-
"luxon": "^3.
|
|
45
|
+
"luxon": "^3.4.0",
|
|
46
46
|
"object-shape-tester": "^0.4.2",
|
|
47
47
|
"type-fest": "^4.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@augment-vir/browser": "^16.
|
|
51
|
-
"@augment-vir/browser-testing": "^16.
|
|
50
|
+
"@augment-vir/browser": "^16.3.0",
|
|
51
|
+
"@augment-vir/browser-testing": "^16.3.0",
|
|
52
52
|
"@open-wc/testing": "^3.2.0",
|
|
53
53
|
"@types/chai": "^4.3.5",
|
|
54
54
|
"@types/mocha": "^10.0.1",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@web/test-runner-commands": "^0.8.0",
|
|
58
58
|
"@web/test-runner-playwright": "^0.10.1",
|
|
59
59
|
"@web/test-runner-visual-regression": "^0.8.2",
|
|
60
|
-
"cspell": "^
|
|
60
|
+
"cspell": "^7.0.0",
|
|
61
61
|
"element-vir": "^16.3.1",
|
|
62
|
-
"esbuild": "^0.19.
|
|
62
|
+
"esbuild": "^0.19.1",
|
|
63
63
|
"istanbul-smart-text-reporter": "^1.1.2",
|
|
64
64
|
"markdown-code-example-inserter": "^0.3.1",
|
|
65
65
|
"npm-check-updates": "^16.10.18",
|