valgen 5.17.1 → 5.17.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/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  ## Changelog
2
2
 
3
- ### [v5.17.1](https://github.com/panates/valgen/compare/v5.17.0...v5.17.1) -
3
+ ### [v5.17.2](https://github.com/panates/valgen/compare/v5.17.1...v5.17.2) -
4
+
5
+ #### 🛠 Refactoring and Updates
6
+
7
+ - refactor: Minor date rule optimization @Eray Hanoğlu
8
+
9
+ ### [v5.17.1](https://github.com/panates/valgen/compare/v5.17.0...v5.17.1) - 24 July 2025
4
10
 
5
11
  #### 🪲 Fixes
6
12
 
@@ -77,8 +77,9 @@ function coerceDateString(input, precision) {
77
77
  String(d.getHours()).padStart(2, '0'),
78
78
  String(d.getMinutes()).padStart(2, '0'),
79
79
  String(d.getSeconds()).padStart(2, '0'),
80
- String(d.getMilliseconds()).padStart(3, '0'),
81
80
  ];
81
+ if (d.getMilliseconds() > 0)
82
+ dateParts.push(String(d.getMilliseconds()).padStart(3, '0'));
82
83
  }
83
84
  else if (typeof input === 'string') {
84
85
  const d = datefns.parseISO(input);
@@ -72,8 +72,9 @@ function coerceDateString(input, precision) {
72
72
  String(d.getHours()).padStart(2, '0'),
73
73
  String(d.getMinutes()).padStart(2, '0'),
74
74
  String(d.getSeconds()).padStart(2, '0'),
75
- String(d.getMilliseconds()).padStart(3, '0'),
76
75
  ];
76
+ if (d.getMilliseconds() > 0)
77
+ dateParts.push(String(d.getMilliseconds()).padStart(3, '0'));
77
78
  }
78
79
  else if (typeof input === 'string') {
79
80
  const d = datefns.parseISO(input);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valgen",
3
3
  "description": "Fast runtime type validator, converter and io (encoding/decoding) library",
4
- "version": "5.17.1",
4
+ "version": "5.17.2",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {