@js-joda/core 6.3.1 → 6.3.2
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.
- package/dist/js-joda.cjs.js +3 -3
- package/dist/js-joda.cjs.js.map +1 -1
- package/dist/js-joda.esm.js +3 -3
- package/dist/js-joda.esm.js.map +1 -1
- package/dist/js-joda.js +3 -3
- package/dist/js-joda.js.map +1 -1
- package/dist/js-joda.min.js +2 -2
- package/package.json +3 -3
- package/src/Duration.js +1 -1
- package/src/Period.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@js-joda/core",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.2",
|
|
4
4
|
"description": "a date and time library for javascript",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "NODE_ENV=test npx mocha --timeout 5000 --require @babel/register ./test/*Test_mochaOnly.js ./test/*Test.js ./test/**/*Test.js ./test/**/**/*Test.js",
|
|
32
32
|
"test-coverage": "NODE_ENV=test COVERAGE=1 npx nyc --report-dir=build/coverage --reporter=lcov --reporter html npx mocha --timeout 5000 --require @babel/register --reporter progress ./test/*Test.js ./test/**/*Test.js ./test/**/**/*Test.js",
|
|
33
33
|
"test-browser": "npx karma start --reporters=dots --single-run",
|
|
34
|
-
"test-ci": "npm run build-dist && npm run test && npm run test-browser && npm run test-ts-definitions && npm run test-coverage",
|
|
34
|
+
"test-ci": "npm run build-dist && npm run lint && npm run test && npm run test-browser && npm run test-ts-definitions && npm run test-coverage",
|
|
35
35
|
"test-ts-definitions": "TS_NODE_PROJECT='../../shared/ts-test-config.json' NODE_ENV=test mocha --timeout 5000 --require ts-node/register ./test/typescript_definitions/*.ts",
|
|
36
36
|
"build-dist": "npx rollup -c rollup.config.js",
|
|
37
37
|
"build-md-toc": "npx markdown-toc -i CheatSheet.md",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"sourceMap": false,
|
|
48
48
|
"instrument": false
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2364adefa7985123ce6d17d4181bf93d0e179351"
|
|
51
51
|
}
|
package/src/Duration.js
CHANGED
|
@@ -315,7 +315,7 @@ export class Duration extends TemporalAmount /*implements TemporalAmount, Compar
|
|
|
315
315
|
/**
|
|
316
316
|
* The pattern for parsing.
|
|
317
317
|
*/
|
|
318
|
-
const PATTERN = new RegExp('([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)
|
|
318
|
+
const PATTERN = new RegExp('^([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?$', 'i');
|
|
319
319
|
const matches = PATTERN.exec(text);
|
|
320
320
|
if (matches !== null) {
|
|
321
321
|
// check for letter T but no time sections
|
package/src/Period.js
CHANGED
|
@@ -18,7 +18,7 @@ import { LocalDate } from './LocalDate';
|
|
|
18
18
|
/**
|
|
19
19
|
* The pattern for parsing.
|
|
20
20
|
*/
|
|
21
|
-
const PATTERN =
|
|
21
|
+
const PATTERN = /^([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?$/i;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* A date-based amount of time, such as '2 years, 3 months and 4 days'.
|