date-and-time 3.4.0 → 3.4.1

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 CHANGED
@@ -25,6 +25,9 @@ npm i date-and-time
25
25
 
26
26
  ## Recent Changes
27
27
 
28
+ - 3.4.1
29
+ - Fixed an issue where `formatTZ()` would output 0:00 as 24:00 in 24-hour format in Node.js.
30
+
28
31
  - 3.4.0
29
32
  - Added `zz` (time zone name) and `z` (time zone name abbreviation) tokens to the `timezone` plugin.
30
33
  - Fixed an issue where token extensions by other plugins were not reflected in functions provided by the `timezone` plugin.
@@ -32,9 +35,6 @@ npm i date-and-time
32
35
  - 3.3.0
33
36
  - Refactored `format()`, `isValid()`, and `preparse()`, further improved performance.
34
37
 
35
- - 3.2.0
36
- - Refactored `compile()`, `format()`, and `preparse()`, slightly improved performance.
37
-
38
38
  ## Usage
39
39
 
40
40
  - ES Modules:
@@ -551,10 +551,12 @@ var plugin = function (proto, date) {
551
551
  case 'weekday':
552
552
  values[type] = 'SunMonTueWedThuFriSat'.indexOf(value) / 3;
553
553
  break;
554
+ case 'hour':
555
+ values[type] = value % 24;
556
+ break;
554
557
  case 'year':
555
558
  case 'month':
556
559
  case 'day':
557
- case 'hour':
558
560
  case 'minute':
559
561
  case 'second':
560
562
  case 'fractionalSecond':
@@ -551,10 +551,12 @@ var plugin = function (proto, date) {
551
551
  case 'weekday':
552
552
  values[type] = 'SunMonTueWedThuFriSat'.indexOf(value) / 3;
553
553
  break;
554
+ case 'hour':
555
+ values[type] = value % 24;
556
+ break;
554
557
  case 'year':
555
558
  case 'month':
556
559
  case 'day':
557
- case 'hour':
558
560
  case 'minute':
559
561
  case 'second':
560
562
  case 'fractionalSecond':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-and-time",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "A Minimalist DateTime utility for Node.js and the browser",
5
5
  "main": "date-and-time.js",
6
6
  "module": "esm/date-and-time.es.js",
@@ -52,7 +52,7 @@
52
52
  "@rollup/plugin-terser": "^0.4.4",
53
53
  "expect.js": "^0.3.1",
54
54
  "mocha": "^10.6.0",
55
- "rollup": "^4.18.0",
55
+ "rollup": "^4.18.1",
56
56
  "tsd": "^0.31.1"
57
57
  }
58
58
  }
@@ -557,10 +557,12 @@
557
557
  case 'weekday':
558
558
  values[type] = 'SunMonTueWedThuFriSat'.indexOf(value) / 3;
559
559
  break;
560
+ case 'hour':
561
+ values[type] = value % 24;
562
+ break;
560
563
  case 'year':
561
564
  case 'month':
562
565
  case 'day':
563
- case 'hour':
564
566
  case 'minute':
565
567
  case 'second':
566
568
  case 'fractionalSecond':