@fr0st/datetime 8.0.2 → 8.0.3
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/README.md +1 -1
- package/dist/frost-datetime.js +8 -10
- package/dist/frost-datetime.js.map +1 -1
- package/dist/frost-datetime.min.js.map +1 -1
- package/package.json +6 -6
- package/src/date-time.js +6 -9
- package/src/helpers.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fr0st/datetime",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Immutable date and time handling for JavaScript with locale-aware formatting, parsing, calendar math, and IANA or fixed-offset time zones.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"src"
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
|
-
"build": "npm run
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
44
|
+
"build": "npm run bundle && npm run minify",
|
|
45
|
+
"bundle": "rollup --config",
|
|
46
|
+
"lint": "eslint",
|
|
47
|
+
"minify": "terser --compress passes=2 --mangle --source-map \"content=dist/frost-datetime.js.map,url=frost-datetime.min.js.map\" --output dist/frost-datetime.min.js dist/frost-datetime.js",
|
|
48
48
|
"locales": "php generate-locales.php > src/formatter/locales.js",
|
|
49
49
|
"test": "mocha --forbid-only --file test/setup.js \"test/unit/**/*.test.js\""
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@fr0st/eslint-config": "^
|
|
52
|
+
"@fr0st/eslint-config": "^5.0.0",
|
|
53
53
|
"eslint": "^10.8.1",
|
|
54
54
|
"mocha": "^11.8.0",
|
|
55
55
|
"rollup": "^4.62.4",
|
package/src/date-time.js
CHANGED
|
@@ -1928,10 +1928,8 @@ export default class DateTime {
|
|
|
1928
1928
|
|
|
1929
1929
|
/**
|
|
1930
1930
|
* Returns a copy with the hours changed in the current time zone.
|
|
1931
|
-
* @param {number}
|
|
1932
|
-
*
|
|
1933
|
-
* @param {number} [seconds] The seconds. (0-59)
|
|
1934
|
-
* @param {number} [milliseconds] The milliseconds.
|
|
1931
|
+
* @param {...number} args The hours (0-23), optionally followed by minutes
|
|
1932
|
+
* (0-59), seconds (0-59), and milliseconds.
|
|
1935
1933
|
* @returns {DateTime} A new DateTime instance.
|
|
1936
1934
|
*/
|
|
1937
1935
|
withHours(...args) {
|
|
@@ -1967,9 +1965,8 @@ export default class DateTime {
|
|
|
1967
1965
|
|
|
1968
1966
|
/**
|
|
1969
1967
|
* Returns a copy with the minutes changed in the current time zone.
|
|
1970
|
-
* @param {number}
|
|
1971
|
-
*
|
|
1972
|
-
* @param {number} [milliseconds] The milliseconds.
|
|
1968
|
+
* @param {...number} args The minutes (0-59), optionally followed by seconds
|
|
1969
|
+
* (0-59) and milliseconds.
|
|
1973
1970
|
* @returns {DateTime} A new DateTime instance.
|
|
1974
1971
|
*/
|
|
1975
1972
|
withMinutes(...args) {
|
|
@@ -2026,8 +2023,8 @@ export default class DateTime {
|
|
|
2026
2023
|
|
|
2027
2024
|
/**
|
|
2028
2025
|
* Returns a copy with the seconds changed in the current time zone.
|
|
2029
|
-
* @param {number}
|
|
2030
|
-
*
|
|
2026
|
+
* @param {...number} args The seconds (0-59), optionally followed by
|
|
2027
|
+
* milliseconds.
|
|
2031
2028
|
* @returns {DateTime} A new DateTime instance.
|
|
2032
2029
|
*/
|
|
2033
2030
|
withSeconds(...args) {
|
package/src/helpers.js
CHANGED