阶段十:完成注释门禁最终验收
This commit is contained in:
1 parent
d1a165f897
commit
f30a1f68f8
29 files changed
+509
-7253
No files matched your search
@@ -1,10 +1,10 @@
|
||||
const padTwoDigits = (value: number): string => String(value).padStart(2, '0');
|
||||
const padTwoDigits = (value: number): string => String(value).padStart(2, '0'); /* padTwoDigits 表示padTwoDigits。 */
|
||||
|
||||
/** Format a timestamp in the browser's current timezone. */
|
||||
export const formatLocalDateTime = (value?: string | number | Date | null): string => {
|
||||
if (value === undefined || value === null || value === '') return '-';
|
||||
|
||||
const date = value instanceof Date ? value : new Date(value);
|
||||
const date = value instanceof Date ? value : new Date(value); /* date 表示date。 */
|
||||
if (Number.isNaN(date.getTime())) return '-';
|
||||
|
||||
return [
|
||||
@@ -16,4 +16,4 @@ export const formatLocalDateTime = (value?: string | number | Date | null): stri
|
||||
padTwoDigits(date.getMinutes()),
|
||||
padTwoDigits(date.getSeconds()),
|
||||
].join(':');
|
||||
};
|
||||
}; /* formatLocalDateTime 表示formatLocalDateTime。 */
|
||||
Reference in new issue
Block a user