mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🚚 稍微调整了下位置
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
import { app, fs, path } from "@tauri-apps/api";
|
||||
|
||||
import { timestampToDate } from "./t2D";
|
||||
import { timestampToDate } from "./toolFunc";
|
||||
|
||||
/**
|
||||
* @description 获取 UIGF 头部信息
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @file utils t2D.ts
|
||||
* @description time to date 时间戳转换为日期工具类
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.3
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 时间戳转换为日期
|
||||
* @since Alpha v0.2.3
|
||||
* @param {number} timestamp - 时间戳(毫秒)
|
||||
* @returns {string} 日期 2021-01-01 00:00:00
|
||||
*/
|
||||
export function timestampToDate(timestamp: number): string {
|
||||
return new Date(timestamp).toLocaleString("zh", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
});
|
||||
}
|
||||
@@ -23,6 +23,23 @@ export function stamp2LastTime(time: number): string {
|
||||
.padStart(2, "0")}:${second.toFixed(0).padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 时间戳转换为日期
|
||||
* @since Alpha v0.2.3
|
||||
* @param {number} timestamp - 时间戳(毫秒)
|
||||
* @returns {string} 日期 2021-01-01 00:00:00
|
||||
*/
|
||||
export function timestampToDate(timestamp: number): string {
|
||||
return new Date(timestamp).toLocaleString("zh", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取 deviceID
|
||||
* @since Beta v0.3.4
|
||||
|
||||
Reference in New Issue
Block a user