umaki 0.4.2 → 0.5.0

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.
Files changed (117) hide show
  1. package/README.md +36 -18
  2. package/dist/_virtual/_commonjsHelpers.cjs.js +1 -1
  3. package/dist/_virtual/_commonjsHelpers.es.js +1 -1
  4. package/dist/_virtual/isBetween.cjs.js +1 -1
  5. package/dist/_virtual/isBetween.es.js +1 -1
  6. package/dist/_virtual/timezone.cjs.js +15 -0
  7. package/dist/_virtual/timezone.es.js +15 -0
  8. package/dist/_virtual/utc.cjs.js +15 -0
  9. package/dist/_virtual/utc.es.js +15 -0
  10. package/dist/index.cjs.js +3 -1
  11. package/dist/index.es.js +3 -1
  12. package/dist/libs/control/bgScrollStop.cjs.js +1 -1
  13. package/dist/libs/control/bgScrollStop.es.js +1 -1
  14. package/dist/libs/control/pd.cjs.js +1 -1
  15. package/dist/libs/control/pd.es.js +1 -1
  16. package/dist/libs/control/scrollToHash.cjs.js +1 -1
  17. package/dist/libs/control/scrollToHash.es.js +1 -1
  18. package/dist/libs/control/videoPlayControl.cjs.js +1 -1
  19. package/dist/libs/control/videoPlayControl.es.js +1 -1
  20. package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +9 -3
  21. package/dist/libs/convert/changeDateStringToSpecificFormat.d.ts +3 -4
  22. package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +9 -3
  23. package/dist/libs/convert/changeDateStringToSpecificFormat.test.d.ts +1 -0
  24. package/dist/libs/convert/jsonStringToJsonObject.cjs.js +1 -1
  25. package/dist/libs/convert/jsonStringToJsonObject.es.js +1 -1
  26. package/dist/libs/eventControl/debounce.cjs.js +1 -1
  27. package/dist/libs/eventControl/debounce.es.js +1 -1
  28. package/dist/libs/eventControl/throttle.cjs.js +1 -1
  29. package/dist/libs/eventControl/throttle.es.js +1 -1
  30. package/dist/libs/get/getAspectRatio.cjs.js +1 -1
  31. package/dist/libs/get/getAspectRatio.es.js +1 -1
  32. package/dist/libs/get/getClassNames.cjs.js +1 -1
  33. package/dist/libs/get/getClassNames.es.js +1 -1
  34. package/dist/libs/get/getDocumentHeight.cjs.js +1 -1
  35. package/dist/libs/get/getDocumentHeight.es.js +1 -1
  36. package/dist/libs/get/getEventPaths.cjs.js +1 -1
  37. package/dist/libs/get/getEventPaths.es.js +1 -1
  38. package/dist/libs/get/getGcd.cjs.js +1 -1
  39. package/dist/libs/get/getGcd.es.js +1 -1
  40. package/dist/libs/get/getOrientation.cjs.js +1 -1
  41. package/dist/libs/get/getOrientation.es.js +1 -1
  42. package/dist/libs/get/getParentList.cjs.js +1 -1
  43. package/dist/libs/get/getParentList.es.js +1 -1
  44. package/dist/libs/get/getQueryParams.cjs.js +1 -1
  45. package/dist/libs/get/getQueryParams.es.js +1 -1
  46. package/dist/libs/get/getRem.cjs.js +1 -1
  47. package/dist/libs/get/getRem.es.js +1 -1
  48. package/dist/libs/get/getScrollbarWidth.cjs.js +1 -1
  49. package/dist/libs/get/getScrollbarWidth.es.js +1 -1
  50. package/dist/libs/get/getSessionStorage.cjs.js +1 -1
  51. package/dist/libs/get/getSessionStorage.es.js +1 -1
  52. package/dist/libs/get/getStringLength.cjs.js +1 -1
  53. package/dist/libs/get/getStringLength.es.js +1 -1
  54. package/dist/libs/get/getStylePropertyValue.cjs.js +1 -1
  55. package/dist/libs/get/getStylePropertyValue.es.js +1 -1
  56. package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +1 -1
  57. package/dist/libs/get/getStylePropertyValueToNumber.es.js +1 -1
  58. package/dist/libs/get/getUaData.cjs.js +1 -1
  59. package/dist/libs/get/getUaData.es.js +1 -1
  60. package/dist/libs/is/index.d.ts +1 -0
  61. package/dist/libs/is/isAfterDateTime.cjs.js +18 -0
  62. package/dist/libs/is/isAfterDateTime.d.ts +10 -0
  63. package/dist/libs/is/isAfterDateTime.es.js +18 -0
  64. package/dist/libs/is/isAfterDateTime.test.d.ts +1 -0
  65. package/dist/libs/is/isBetweenDateTime.cjs.js +1 -1
  66. package/dist/libs/is/isBetweenDateTime.es.js +1 -1
  67. package/dist/libs/is/isExistAllElements.cjs.js +1 -1
  68. package/dist/libs/is/isExistAllElements.es.js +1 -1
  69. package/dist/libs/is/isIpad.cjs.js +1 -1
  70. package/dist/libs/is/isIpad.es.js +1 -1
  71. package/dist/libs/is/isKeyExists.cjs.js +1 -1
  72. package/dist/libs/is/isKeyExists.es.js +1 -1
  73. package/dist/libs/is/isSafari.cjs.js +1 -1
  74. package/dist/libs/is/isSafari.es.js +1 -1
  75. package/dist/libs/is/isScrollable.cjs.js +1 -1
  76. package/dist/libs/is/isScrollable.es.js +1 -1
  77. package/dist/libs/is/isTouchSupport.cjs.js +1 -1
  78. package/dist/libs/is/isTouchSupport.es.js +1 -1
  79. package/dist/libs/remove/removeAllHtmlTags.cjs.js +1 -1
  80. package/dist/libs/remove/removeAllHtmlTags.es.js +1 -1
  81. package/dist/libs/remove/removeAttribute.cjs.js +1 -1
  82. package/dist/libs/remove/removeAttribute.es.js +1 -1
  83. package/dist/libs/remove/removeSessionStorage.cjs.js +1 -1
  84. package/dist/libs/remove/removeSessionStorage.es.js +1 -1
  85. package/dist/libs/remove/removeStylePropertyValue.cjs.js +1 -1
  86. package/dist/libs/remove/removeStylePropertyValue.es.js +1 -1
  87. package/dist/libs/security/htmlSanitize.cjs.js +1 -1
  88. package/dist/libs/security/htmlSanitize.es.js +1 -1
  89. package/dist/libs/set/set100vh.cjs.js +1 -1
  90. package/dist/libs/set/set100vh.es.js +1 -1
  91. package/dist/libs/set/set100vw.cjs.js +1 -1
  92. package/dist/libs/set/set100vw.es.js +1 -1
  93. package/dist/libs/set/setAttribute.cjs.js +1 -1
  94. package/dist/libs/set/setAttribute.es.js +1 -1
  95. package/dist/libs/set/setScrollPositionToCenter.cjs.js +1 -1
  96. package/dist/libs/set/setScrollPositionToCenter.es.js +1 -1
  97. package/dist/libs/set/setSessionStorage.cjs.js +1 -1
  98. package/dist/libs/set/setSessionStorage.es.js +1 -1
  99. package/dist/libs/set/setStylePropertyValue.cjs.js +1 -1
  100. package/dist/libs/set/setStylePropertyValue.es.js +1 -1
  101. package/dist/libs/to/toBoolean.cjs.js +1 -1
  102. package/dist/libs/to/toBoolean.es.js +1 -1
  103. package/dist/libs/to/toPositiveNumber.cjs.js +1 -1
  104. package/dist/libs/to/toPositiveNumber.es.js +1 -1
  105. package/dist/libs/transform/wrapTextWithSpans.cjs.js +1 -1
  106. package/dist/libs/transform/wrapTextWithSpans.es.js +1 -1
  107. package/dist/libs/wait/sleep.cjs.js +1 -1
  108. package/dist/libs/wait/sleep.es.js +1 -1
  109. package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +1 -1
  110. package/dist/libs/wait/waitForAllMediaLoaded.es.js +1 -1
  111. package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +1 -1
  112. package/dist/node_modules/dayjs/plugin/isBetween.es.js +1 -1
  113. package/dist/node_modules/dayjs/plugin/timezone.cjs.js +78 -0
  114. package/dist/node_modules/dayjs/plugin/timezone.es.js +78 -0
  115. package/dist/node_modules/dayjs/plugin/utc.cjs.js +91 -0
  116. package/dist/node_modules/dayjs/plugin/utc.es.js +91 -0
  117. package/package.json +1 -1
package/README.md CHANGED
@@ -46,6 +46,7 @@ import { foo } from "umaki";
46
46
  - [getStylePropertyValueToNumber](#getstylepropertyvaluetonumber)
47
47
  - [getUaData](#getuadata)
48
48
  - [Is](#is)
49
+ - [isAfterDateTime](#isafterdatetime)
49
50
  - [isBetweenDateTime](#isbetweendatetime)
50
51
  - [isExistAllElements](#isexistallelements)
51
52
  - [isIpad](#isipad)
@@ -154,28 +155,25 @@ const date = "2023-10-05";
154
155
  const formattedDate = changeDateStringToSpecificFormat(date, "MM/DD/YYYY");
155
156
  console.log(formattedDate); // '10/05/2023'
156
157
 
157
- // With locale
158
- import "dayjs/locale/ja";
159
- const dateWithLocale = "2025-04-25T00:00:00.000Z";
160
- const formattedDateWithLocale = changeDateStringToSpecificFormat(
161
- dateWithLocale,
162
- "YYYY年MM月DD日 (ddd)",
163
- "ja"
158
+ // With timezone
159
+ const dateWithTz = "2025-04-25T00:00:00.000Z";
160
+ const formattedDateWithTz = changeDateStringToSpecificFormat(
161
+ dateWithTz,
162
+ "YYYY-MM-DD HH:mm:ss",
163
+ "Asia/Tokyo"
164
164
  );
165
- console.log(formattedDateWithLocale); // '2025年04月25日 (金)'
166
-
167
- // With different locale
168
- import "dayjs/locale/en";
169
- const formattedDateWithEnLocale = changeDateStringToSpecificFormat(
170
- dateWithLocale,
171
- "YYYY年MM月DD日 (ddd)",
172
- "en"
165
+ console.log(formattedDateWithTz); // '2025-04-25 09:00:00'
166
+
167
+ // With different timezone
168
+ const formattedDateWithDifferentTz = changeDateStringToSpecificFormat(
169
+ dateWithTz,
170
+ "YYYY-MM-DD HH:mm:ss",
171
+ "America/New_York"
173
172
  );
174
- console.log(formattedDateWithEnLocale); // '2025年04月25日 (Fri)'
173
+ console.log(formattedDateWithDifferentTz); // '2025-04-24 20:00:00'
175
174
  ```
176
175
 
177
- Note: To use specific locales, you need to import the corresponding locale file in your project.
178
- Example: `import 'dayjs/locale/ja'`
176
+ Note: This function focuses on timezone handling rather than locale-specific formatting. When a timezone is specified, the date will be converted to that timezone before formatting.
179
177
 
180
178
  [View file →](src/libs/convert/changeDateStringToSpecificFormat.ts)
181
179
 
@@ -453,6 +451,26 @@ console.log(uaData);
453
451
 
454
452
  ## Is
455
453
 
454
+ ### isAfterDateTime
455
+
456
+ A function that checks if the current date is after a specified date.
457
+
458
+ ```ts
459
+ import { isAfterDateTime } from "umaki";
460
+
461
+ const targetDate = "2023-10-01";
462
+ const result = isAfterDateTime(targetDate);
463
+ console.log(result); // true or false
464
+
465
+ // With custom current date
466
+ import dayjs from "dayjs";
467
+
468
+ const customCurrentDate = "2023-11-15";
469
+ const resultWithCustomDate = isAfterDateTime(targetDate, dayjs(customCurrentDate));
470
+ ```
471
+
472
+ [View file →](src/libs/is/isAfterDateTime.ts)
473
+
456
474
  ### isBetweenDateTime
457
475
 
458
476
  A function that checks if the current date is between two specified dates.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.5.0
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ var timezone = { exports: {} };
15
+ exports.__module = timezone;
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.5.0
4
+ * description: A utility that is often used in web production.
5
+ * author: TsubasaHiga
6
+ * homepage: https://github.com/TsubasaHiga/umaki
7
+ * Released under the MIT License
8
+ *
9
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
10
+ * For license information, please see LICENSE.txt
11
+ */
12
+ var timezone = { exports: {} };
13
+ export {
14
+ timezone as __module
15
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.5.0
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ var utc = { exports: {} };
15
+ exports.__module = utc;
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.5.0
4
+ * description: A utility that is often used in web production.
5
+ * author: TsubasaHiga
6
+ * homepage: https://github.com/TsubasaHiga/umaki
7
+ * Released under the MIT License
8
+ *
9
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
10
+ * For license information, please see LICENSE.txt
11
+ */
12
+ var utc = { exports: {} };
13
+ export {
14
+ utc as __module
15
+ };
package/dist/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -34,6 +34,7 @@ const getStringLength = require("./libs/get/getStringLength.cjs.js");
34
34
  const getStylePropertyValue = require("./libs/get/getStylePropertyValue.cjs.js");
35
35
  const getStylePropertyValueToNumber = require("./libs/get/getStylePropertyValueToNumber.cjs.js");
36
36
  const getUaData = require("./libs/get/getUaData.cjs.js");
37
+ const isAfterDateTime = require("./libs/is/isAfterDateTime.cjs.js");
37
38
  const isBetweenDateTime = require("./libs/is/isBetweenDateTime.cjs.js");
38
39
  const isExistAllElements = require("./libs/is/isExistAllElements.cjs.js");
39
40
  const isIpad = require("./libs/is/isIpad.cjs.js");
@@ -80,6 +81,7 @@ exports.getStringLength = getStringLength.getStringLength;
80
81
  exports.getStylePropertyValue = getStylePropertyValue.getStylePropertyValue;
81
82
  exports.getStylePropertyValueToNumber = getStylePropertyValueToNumber.getStylePropertyValueToNumber;
82
83
  exports.getUaData = getUaData.getUaData;
84
+ exports.isAfterDateTime = isAfterDateTime.isAfterDateTime;
83
85
  exports.isBetweenDateTime = isBetweenDateTime.isBetweenDateTime;
84
86
  exports.isExistAllElements = isExistAllElements.isExistAllElements;
85
87
  exports.isIpad = isIpad.isIpad;
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -32,6 +32,7 @@ import { getStringLength } from "./libs/get/getStringLength.es.js";
32
32
  import { getStylePropertyValue } from "./libs/get/getStylePropertyValue.es.js";
33
33
  import { getStylePropertyValueToNumber } from "./libs/get/getStylePropertyValueToNumber.es.js";
34
34
  import { getUaData } from "./libs/get/getUaData.es.js";
35
+ import { isAfterDateTime } from "./libs/is/isAfterDateTime.es.js";
35
36
  import { isBetweenDateTime } from "./libs/is/isBetweenDateTime.es.js";
36
37
  import { isExistAllElements } from "./libs/is/isExistAllElements.es.js";
37
38
  import { isIpad } from "./libs/is/isIpad.es.js";
@@ -75,6 +76,7 @@ export {
75
76
  getStylePropertyValueToNumber,
76
77
  getUaData,
77
78
  htmlSanitize,
79
+ isAfterDateTime,
78
80
  isBetweenDateTime,
79
81
  isExistAllElements,
80
82
  isIpad,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -12,8 +12,14 @@
12
12
  */
13
13
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
14
  const dayjs = require("dayjs");
15
- const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", locale = "ja") => {
16
- dayjs.locale(locale);
15
+ const timezone = require("../../node_modules/dayjs/plugin/timezone.cjs.js");
16
+ const utc = require("../../node_modules/dayjs/plugin/utc.cjs.js");
17
+ const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", tz) => {
18
+ if (tz) {
19
+ dayjs.extend(utc.default);
20
+ dayjs.extend(timezone.default);
21
+ return dayjs(date).tz(tz).format(format);
22
+ }
17
23
  return dayjs(date).format(format);
18
24
  };
19
25
  exports.changeDateStringToSpecificFormat = changeDateStringToSpecificFormat;
@@ -1,12 +1,11 @@
1
1
  /**
2
2
  * Converts a date string to a specific format using the dayjs library.
3
3
  *
4
- * Note: To use specific locales, you need to import the corresponding locale file in your project.
5
- * Example: import 'dayjs/locale/ja'
4
+ * Note: This function focuses on timezone handling rather than locale-specific formatting.
6
5
  *
7
6
  * @param date - The date string to be converted.
8
7
  * @param format - The format to convert the date string to. Defaults to 'YYYY年MM月DD日'.
9
- * @param locale - The locale to use for formatting. Defaults to 'ja'.
8
+ * @param tz - Optional timezone (e.g., 'Asia/Tokyo'). If provided, the date will be converted to this timezone.
10
9
  * @returns The formatted date string.
11
10
  */
12
- export declare const changeDateStringToSpecificFormat: (date: string, format?: string, locale?: string) => string;
11
+ export declare const changeDateStringToSpecificFormat: (date: string, format?: string, tz?: string | null) => string;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -10,8 +10,14 @@
10
10
  * For license information, please see LICENSE.txt
11
11
  */
12
12
  import dayjs from "dayjs";
13
- const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", locale = "ja") => {
14
- dayjs.locale(locale);
13
+ import timezone from "../../node_modules/dayjs/plugin/timezone.es.js";
14
+ import utc from "../../node_modules/dayjs/plugin/utc.es.js";
15
+ const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", tz) => {
16
+ if (tz) {
17
+ dayjs.extend(utc);
18
+ dayjs.extend(timezone);
19
+ return dayjs(date).tz(tz).format(format);
20
+ }
15
21
  return dayjs(date).format(format);
16
22
  };
17
23
  export {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * name: umaki
4
- * version: v0.4.2
4
+ * version: v0.5.0
5
5
  * description: A utility that is often used in web production.
6
6
  * author: TsubasaHiga
7
7
  * homepage: https://github.com/TsubasaHiga/umaki
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * name: umaki
3
- * version: v0.4.2
3
+ * version: v0.5.0
4
4
  * description: A utility that is often used in web production.
5
5
  * author: TsubasaHiga
6
6
  * homepage: https://github.com/TsubasaHiga/umaki