merge: 同步 upstream/main 新功能到定制版本
- feat: Add slider verification code (bd67997) - fix bug: Inventory cannot be zero (1f7a6ee) - fix: resolve merge conflicts and lint errors
This commit is contained in:
@@ -29,13 +29,10 @@ export function formatDate(date?: Date | number, showTime = true) {
|
||||
// Unix timestamps (seconds): 10 digits e.g. 1771936457
|
||||
// JavaScript timestamps (milliseconds): 13 digits
|
||||
let dateValue = date;
|
||||
if (typeof date === "number") {
|
||||
if (date < 10000000000) {
|
||||
dateValue = date * 1000;
|
||||
}
|
||||
if (typeof date === "number" && date < 10_000_000_000) {
|
||||
dateValue = date * 1000;
|
||||
}
|
||||
|
||||
|
||||
const timeZone = localStorage.getItem("timezone") || "UTC";
|
||||
return intlFormat(dateValue, {
|
||||
year: "numeric",
|
||||
|
||||
Reference in New Issue
Block a user