@meatech/payblend_app_ui_component 1.0.99 → 1.1.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/.trunk/trunk.yaml +2 -2
- package/constants/config.ts +1 -1
- package/dist/constants/config.d.ts +1 -1
- package/dist/constants/config.js +1 -1
- package/dist/constants/config.js.map +1 -1
- package/dist/utils/dayjs.d.ts +2 -1
- package/dist/utils/dayjs.d.ts.map +1 -1
- package/dist/utils/dayjs.js +3 -1
- package/dist/utils/dayjs.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +1 -2
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/utils/dayjs.ts +4 -1
- package/utils/utils.ts +1 -2
package/.trunk/trunk.yaml
CHANGED
|
@@ -17,9 +17,9 @@ runtimes:
|
|
|
17
17
|
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
|
|
18
18
|
lint:
|
|
19
19
|
enabled:
|
|
20
|
-
- checkov@3.2.
|
|
20
|
+
- checkov@3.2.473
|
|
21
21
|
- git-diff-check
|
|
22
|
-
- osv-scanner@2.2.
|
|
22
|
+
- osv-scanner@2.2.3
|
|
23
23
|
- oxipng@9.1.5
|
|
24
24
|
- prettier@3.6.2
|
|
25
25
|
- trufflehog@3.90.8
|
package/constants/config.ts
CHANGED
package/dist/constants/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../constants/config.ts"],"sourcesContent":["export const MAX_OTP_LENGTH = 6;\nexport const OTP_TIMER_SECOND = 60;\nexport const MIN_AGE_LIMIT =
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../constants/config.ts"],"sourcesContent":["export const MAX_OTP_LENGTH = 6;\nexport const OTP_TIMER_SECOND = 60;\nexport const MIN_AGE_LIMIT = 18;\nexport const ACCESS_TOKEN_KEY = 'accessToken';\nexport const REFRESH_TOKEN_KEY = 'refreshToken';"],"names":[],"mappings":"AAAO,MAAM,cAAc,GAAG;AACvB,MAAM,gBAAgB,GAAG;AACzB,MAAM,aAAa,GAAG;AACtB,MAAM,gBAAgB,GAAG;AACzB,MAAM,iBAAiB,GAAG;;;;"}
|
package/dist/utils/dayjs.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ declare const formatTimeFromNow: (time: string) => any;
|
|
|
7
7
|
declare const formatDate: (date: string | Date) => any;
|
|
8
8
|
declare const formatDateToJapanese: (date: string) => string;
|
|
9
9
|
declare const formatHour: (time: string) => any;
|
|
10
|
+
declare const formatInfoDate: (date: string) => string;
|
|
10
11
|
|
|
11
12
|
declare const resolveDateTimeDisplay: (dateTime: string) => any;
|
|
12
13
|
|
|
13
|
-
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatTimeFromNow, resolveDateTimeDisplay };
|
|
14
|
+
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatInfoDate, formatTimeFromNow, resolveDateTimeDisplay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayjs.d.ts","sourceRoot":"","sources":["../../utils/dayjs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"dayjs.d.ts","sourceRoot":"","sources":["../../utils/dayjs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,iBAAiB,CAAC;AAczB,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,QAA0B,CAAC;AACpE,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,QAA8B,CAAC;AAC5E,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,QAA0B,CAAC;AACzE,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,GAAG,IAAI,QACR,CAAC;AACvC,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MACnB,CAAC;AAClC,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,QACD,CAAC;AACvC,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,MACH,CAAC;AAC5C,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,QAQtD,CAAC"}
|
package/dist/utils/dayjs.js
CHANGED
|
@@ -12,6 +12,7 @@ dayjs.locale('ja');
|
|
|
12
12
|
const FORMAT_TIME = {
|
|
13
13
|
HOUR: 'HH:mm',
|
|
14
14
|
DATE: 'YYYY/MM/DD',
|
|
15
|
+
INFO_DATE: 'YYYY.MM.DD',
|
|
15
16
|
};
|
|
16
17
|
const HOUR_FORMAT = 'HH:mm';
|
|
17
18
|
const DAY_FORMAT = 'YYYY/MM/DD';
|
|
@@ -22,6 +23,7 @@ const formatTimeFromNow = (time) => dayjs(time).fromNow();
|
|
|
22
23
|
const formatDate = (date) => dayjs(date).format(FORMAT_TIME.DATE);
|
|
23
24
|
const formatDateToJapanese = (date) => dayjs(date).format('YYYY年M月D日');
|
|
24
25
|
const formatHour = (time) => dayjs(time).format(FORMAT_TIME.HOUR);
|
|
26
|
+
const formatInfoDate = (date) => dayjs(date).format(FORMAT_TIME.INFO_DATE);
|
|
25
27
|
const resolveDateTimeDisplay = (dateTime) => {
|
|
26
28
|
const time = checkIsToday(dateTime)
|
|
27
29
|
? formatHour(dateTime)
|
|
@@ -31,5 +33,5 @@ const resolveDateTimeDisplay = (dateTime) => {
|
|
|
31
33
|
return time;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
|
-
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatTimeFromNow, resolveDateTimeDisplay };
|
|
36
|
+
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatInfoDate, formatTimeFromNow, resolveDateTimeDisplay };
|
|
35
37
|
//# sourceMappingURL=dayjs.js.map
|
package/dist/utils/dayjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayjs.js","sources":["../../../utils/dayjs.ts"],"sourcesContent":["import isYesterday from 'dayjs/plugin/isYesterday';\nimport dayjs from 'dayjs';\nimport isToday from 'dayjs/plugin/isToday';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport 'dayjs/locale/ja';\n\ndayjs.extend(isToday);\ndayjs.extend(isYesterday);\ndayjs.extend(relativeTime);\ndayjs.locale('ja');\n\nconst FORMAT_TIME = {\n HOUR: 'HH:mm',\n PAST: 'past',\n DATE: 'YYYY/MM/DD',\n};\n\nexport const HOUR_FORMAT = 'HH:mm';\nexport const DAY_FORMAT = 'YYYY/MM/DD';\nexport const YESTERDAY_TEXT = 'Yesterday';\n\nexport const checkIsToday = (date: string) => dayjs(date).isToday();\nexport const checkIsYesterDay = (date: string) => dayjs(date).isYesterday();\nexport const formatTimeFromNow = (time: string) => dayjs(time).fromNow();\nexport const formatDate = (date: string | Date) =>\n dayjs(date).format(FORMAT_TIME.DATE);\
|
|
1
|
+
{"version":3,"file":"dayjs.js","sources":["../../../utils/dayjs.ts"],"sourcesContent":["import isYesterday from 'dayjs/plugin/isYesterday';\nimport dayjs from 'dayjs';\nimport isToday from 'dayjs/plugin/isToday';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport 'dayjs/locale/ja';\n\ndayjs.extend(isToday);\ndayjs.extend(isYesterday);\ndayjs.extend(relativeTime);\ndayjs.locale('ja');\n\nconst FORMAT_TIME = {\n HOUR: 'HH:mm',\n PAST: 'past',\n DATE: 'YYYY/MM/DD',\n INFO_DATE: 'YYYY.MM.DD',\n};\n\nexport const HOUR_FORMAT = 'HH:mm';\nexport const DAY_FORMAT = 'YYYY/MM/DD';\nexport const YESTERDAY_TEXT = 'Yesterday';\n\nexport const checkIsToday = (date: string) => dayjs(date).isToday();\nexport const checkIsYesterDay = (date: string) => dayjs(date).isYesterday();\nexport const formatTimeFromNow = (time: string) => dayjs(time).fromNow();\nexport const formatDate = (date: string | Date) =>\n dayjs(date).format(FORMAT_TIME.DATE);\nexport const formatDateToJapanese = (date: string): string => \n dayjs(date).format('YYYY年M月D日');\nexport const formatHour = (time: string) =>\n dayjs(time).format(FORMAT_TIME.HOUR);\nexport const formatInfoDate = (date: string): string =>\n dayjs(date).format(FORMAT_TIME.INFO_DATE);\nexport default dayjs;\n\nexport const resolveDateTimeDisplay = (dateTime: string) => {\n const time = checkIsToday(dateTime)\n ? formatHour(dateTime)\n : checkIsYesterDay(dateTime)\n ? `${YESTERDAY_TEXT} ${formatHour(dateTime)}`\n : formatDate(dateTime);\n\n return time;\n};\n"],"names":[],"mappings":";;;;;;;AAMA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;AACrB,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC;AACzB,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;AAC1B,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;AAElB,MAAM,WAAW,GAAG;AAClB,IAAA,IAAI,EAAE,OAAO;AACb,IACA,IAAI,EAAE,YAAY;AAClB,IAAA,SAAS,EAAE,YAAY;CACxB;AAEM,MAAM,WAAW,GAAG;AACpB,MAAM,UAAU,GAAG;AACnB,MAAM,cAAc,GAAG;AAEjB,MAAA,YAAY,GAAG,CAAC,IAAY,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO;AACpD,MAAA,gBAAgB,GAAG,CAAC,IAAY,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW;AAC5D,MAAA,iBAAiB,GAAG,CAAC,IAAY,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO;MACzD,UAAU,GAAG,CAAC,IAAmB,KAC5C,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;AACxB,MAAA,oBAAoB,GAAG,CAAC,IAAY,KAC/C,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW;MACnB,UAAU,GAAG,CAAC,IAAY,KACrC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;MACxB,cAAc,GAAG,CAAC,IAAY,KACzC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS;AAG7B,MAAA,sBAAsB,GAAG,CAAC,QAAgB,KAAI;AACzD,IAAA,MAAM,IAAI,GAAG,YAAY,CAAC,QAAQ;AAChC,UAAE,UAAU,CAAC,QAAQ;AACrB,UAAE,gBAAgB,CAAC,QAAQ;cACzB,GAAG,cAAc,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,CAAE;AAC7C,cAAE,UAAU,CAAC,QAAQ,CAAC;AAExB,IAAA,OAAO,IAAI;AACb;;;;"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { getSecureDataString, removeSecureDataString, setSecureDataString, stora
|
|
|
2
2
|
export { mergeIfDefined } from './obj.js';
|
|
3
3
|
export { additiveInverseArray } from './array.js';
|
|
4
4
|
export { bound, lowerBound, upperBound } from './number.js';
|
|
5
|
-
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatTimeFromNow, resolveDateTimeDisplay } from './dayjs.js';
|
|
5
|
+
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatInfoDate, formatTimeFromNow, resolveDateTimeDisplay } from './dayjs.js';
|
|
6
6
|
export { getImageSource } from './imageUtils.js';
|
|
7
7
|
export { checkMetAge, encryptData, formatDateToJapaneseStyle, formatNumber, formatNumberWithCommas, formatPhoneNumber, keyExtractor } from './utils.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { getSecureDataString, removeSecureDataString, setSecureDataString, stora
|
|
|
2
2
|
export { mergeIfDefined } from './obj.js';
|
|
3
3
|
export { additiveInverseArray } from './array.js';
|
|
4
4
|
export { bound, lowerBound, upperBound } from './number.js';
|
|
5
|
-
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatTimeFromNow, resolveDateTimeDisplay } from './dayjs.js';
|
|
5
|
+
export { DAY_FORMAT, HOUR_FORMAT, YESTERDAY_TEXT, checkIsToday, checkIsYesterDay, formatDate, formatDateToJapanese, formatHour, formatInfoDate, formatTimeFromNow, resolveDateTimeDisplay } from './dayjs.js';
|
|
6
6
|
export { getImageSource } from './imageUtils.js';
|
|
7
7
|
export { checkMetAge, encryptData, formatDateToJapaneseStyle, formatNumber, formatNumberWithCommas, formatPhoneNumber, keyExtractor } from './utils.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../utils/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,EAAE,OAAO,MAAM,WAAqB,CAAC;AAE/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,UAEzC;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,GAAG,GAAG,GAAG,GAAG,GAAS,UA6B5B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,UAGxC;AAED,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,yBAAyB,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../utils/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,EAAE,OAAO,MAAM,WAAqB,CAAC;AAE/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,UAEzC;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,GAAG,GAAG,GAAG,GAAG,GAAS,UA6B5B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,UAGxC;AAED,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,yBAAyB,EAAE,OAAO,WAsBnC;AACD,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,GAAG,MAAM,KAAG,MAa1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,WAInD,CAAC"}
|
package/dist/utils/utils.js
CHANGED
|
@@ -52,8 +52,7 @@ function checkMetAge(dateString, isParentalConsentObtained) {
|
|
|
52
52
|
const monthDifference = today.getMonth() - birthDate.getMonth();
|
|
53
53
|
const dayDifference = today.getDate() - birthDate.getDate();
|
|
54
54
|
if (age > MIN_AGE_LIMIT ||
|
|
55
|
-
(
|
|
56
|
-
(monthDifference > 0 || (monthDifference === 0 && dayDifference >= 0)))) {
|
|
55
|
+
(monthDifference > 0 || (monthDifference === 0 && dayDifference >= 0))) {
|
|
57
56
|
return true;
|
|
58
57
|
}
|
|
59
58
|
return false;
|
package/dist/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../utils/utils.ts"],"sourcesContent":["import { MIN_AGE_LIMIT } from '@ui/constants';\n\nexport const keyExtractor = (item: unknown, index: number) => index.toString();\n/* eslint-disable curly */\nexport function formatNumber(value: string) {\n return value?.replace?.(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}\n\nexport function formatDateToJapaneseStyle(\n dateString: string,\n type: '1' | '2' | '3' = '1'\n) {\n if (!dateString) return '';\n let day,\n month,\n year,\n hour = 0,\n minute = 0,\n second = 0;\n if (dateString.length === 8) {\n year = parseInt(dateString.slice(0, 4), 10);\n month = parseInt(dateString.slice(4, 6), 10);\n day = parseInt(dateString.slice(6, 8), 10);\n } else {\n const date = new Date(dateString);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n hour = date.getHours();\n minute = date.getMinutes();\n second = date.getSeconds();\n }\n if (type === '2') {\n return `${year}年 ${month}月 ${day}日 ${hour}:${minute}:${second}`;\n } else if (type === '3') {\n return `${year}/${month}/${day} ${hour}:${minute}まで`;\n } else {\n return `${month}月 ${day}日 ${hour}:${minute}:${second} 時点`;\n }\n}\n\nexport function encryptData(value: string) {\n if (!value) return '';\n return value?.replace?.(/,/g, '')?.replace?.(/[a-zA-Z0-9]/g, '*');\n}\n\nexport function checkMetAge(\n dateString: string,\n isParentalConsentObtained: boolean\n) {\n if (isParentalConsentObtained) {\n return true;\n }\n const today = new Date();\n const birthDate = new Date(\n parseInt(dateString.substring(0, 4)),\n parseInt(dateString.substring(4, 6)) - 1,\n parseInt(dateString.substring(6, 8))\n );\n const age = today.getFullYear() - birthDate.getFullYear();\n const monthDifference = today.getMonth() - birthDate.getMonth();\n const dayDifference = today.getDate() - birthDate.getDate();\n if (\n age > MIN_AGE_LIMIT ||\n (
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../utils/utils.ts"],"sourcesContent":["import { MIN_AGE_LIMIT } from '@ui/constants';\n\nexport const keyExtractor = (item: unknown, index: number) => index.toString();\n/* eslint-disable curly */\nexport function formatNumber(value: string) {\n return value?.replace?.(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}\n\nexport function formatDateToJapaneseStyle(\n dateString: string,\n type: '1' | '2' | '3' = '1'\n) {\n if (!dateString) return '';\n let day,\n month,\n year,\n hour = 0,\n minute = 0,\n second = 0;\n if (dateString.length === 8) {\n year = parseInt(dateString.slice(0, 4), 10);\n month = parseInt(dateString.slice(4, 6), 10);\n day = parseInt(dateString.slice(6, 8), 10);\n } else {\n const date = new Date(dateString);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n hour = date.getHours();\n minute = date.getMinutes();\n second = date.getSeconds();\n }\n if (type === '2') {\n return `${year}年 ${month}月 ${day}日 ${hour}:${minute}:${second}`;\n } else if (type === '3') {\n return `${year}/${month}/${day} ${hour}:${minute}まで`;\n } else {\n return `${month}月 ${day}日 ${hour}:${minute}:${second} 時点`;\n }\n}\n\nexport function encryptData(value: string) {\n if (!value) return '';\n return value?.replace?.(/,/g, '')?.replace?.(/[a-zA-Z0-9]/g, '*');\n}\n\nexport function checkMetAge(\n dateString: string,\n isParentalConsentObtained: boolean\n) {\n if (isParentalConsentObtained) {\n return true;\n }\n const today = new Date();\n const birthDate = new Date(\n parseInt(dateString.substring(0, 4)),\n parseInt(dateString.substring(4, 6)) - 1,\n parseInt(dateString.substring(6, 8))\n );\n const age = today.getFullYear() - birthDate.getFullYear();\n const monthDifference = today.getMonth() - birthDate.getMonth();\n const dayDifference = today.getDate() - birthDate.getDate();\n if (\n age > MIN_AGE_LIMIT ||\n (monthDifference > 0 || (monthDifference === 0 && dayDifference >= 0))\n ) {\n return true;\n }\n\n return false;\n}\nexport const formatPhoneNumber = (phone: string | number): string => {\n const digits = phone.toString().replace(/\\D/g, '');\n\n if (digits.length <= 3) return digits;\n\n let formatted = digits.slice(0, 3);\n let remainder = digits.slice(3);\n\n for (let i = 0; i < remainder.length; i += 4) {\n formatted += `-${remainder.slice(i, i + 4)}`;\n }\n\n return formatted;\n};\n\nexport const formatNumberWithCommas = (value: string) => {\n const cleaned = value.replace(/,/g, '');\n if (!cleaned) return '';\n return parseInt(cleaned, 10).toLocaleString('en-US');\n};\n"],"names":[],"mappings":";;;;AAEO,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,KAAa,KAAK,KAAK,CAAC,QAAQ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AA,sBAAsB,GAAG,CAAC,KAAa,KAAI;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AACvC,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,EAAE;IACvB,OAAO,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC;AACtD;;;;"}
|
package/package.json
CHANGED
package/utils/dayjs.ts
CHANGED
|
@@ -13,6 +13,7 @@ const FORMAT_TIME = {
|
|
|
13
13
|
HOUR: 'HH:mm',
|
|
14
14
|
PAST: 'past',
|
|
15
15
|
DATE: 'YYYY/MM/DD',
|
|
16
|
+
INFO_DATE: 'YYYY.MM.DD',
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export const HOUR_FORMAT = 'HH:mm';
|
|
@@ -24,10 +25,12 @@ export const checkIsYesterDay = (date: string) => dayjs(date).isYesterday();
|
|
|
24
25
|
export const formatTimeFromNow = (time: string) => dayjs(time).fromNow();
|
|
25
26
|
export const formatDate = (date: string | Date) =>
|
|
26
27
|
dayjs(date).format(FORMAT_TIME.DATE);
|
|
27
|
-
|
|
28
|
+
export const formatDateToJapanese = (date: string): string =>
|
|
28
29
|
dayjs(date).format('YYYY年M月D日');
|
|
29
30
|
export const formatHour = (time: string) =>
|
|
30
31
|
dayjs(time).format(FORMAT_TIME.HOUR);
|
|
32
|
+
export const formatInfoDate = (date: string): string =>
|
|
33
|
+
dayjs(date).format(FORMAT_TIME.INFO_DATE);
|
|
31
34
|
export default dayjs;
|
|
32
35
|
|
|
33
36
|
export const resolveDateTimeDisplay = (dateTime: string) => {
|
package/utils/utils.ts
CHANGED
|
@@ -62,8 +62,7 @@ export function checkMetAge(
|
|
|
62
62
|
const dayDifference = today.getDate() - birthDate.getDate();
|
|
63
63
|
if (
|
|
64
64
|
age > MIN_AGE_LIMIT ||
|
|
65
|
-
(
|
|
66
|
-
(monthDifference > 0 || (monthDifference === 0 && dayDifference >= 0)))
|
|
65
|
+
(monthDifference > 0 || (monthDifference === 0 && dayDifference >= 0))
|
|
67
66
|
) {
|
|
68
67
|
return true;
|
|
69
68
|
}
|