@arkyn/shared 2.2.0 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/shared",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./src/index.ts",
6
6
  "type": "module",
@@ -55,7 +55,7 @@ const formatDate: FormatDateFunction = (
55
55
  timezone = 0
56
56
  ) => {
57
57
  const dateParts = date.split(/[-/]/).map(Number);
58
- const timeParts = time.split(":").map(Number);
58
+ const timeParts = time.split(".")[0].split(":").map(Number);
59
59
 
60
60
  let day, month, year;
61
61
  const [hours = 0, minutes = 0, seconds = 0] = timeParts;
@@ -32,7 +32,7 @@ const formatToDate: FormatToDateFunction = (
32
32
  timezone = 0
33
33
  ) => {
34
34
  const dateParts = date.split(/[-/]/).map(Number);
35
- const timeParts = time.split(":").map(Number);
35
+ const timeParts = time.split(".")[0].split(":").map(Number);
36
36
 
37
37
  let day, month, year;
38
38
  const [hours = 0, minutes = 0, seconds = 0] = timeParts;