mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-12 11:09:54 +08:00
fix
This commit is contained in:
@@ -90,3 +90,11 @@ export const formatSeconds = (seconds: number) => {
|
||||
|
||||
return formattedTime;
|
||||
}
|
||||
|
||||
|
||||
// YYYY-MM-DD 转化为Date
|
||||
export const parseDate = (dateString: string): Date => {
|
||||
if (!dateString) return new Date();
|
||||
const [year, month, day] = dateString.split('-').map(Number);
|
||||
return new Date(year, month - 1, day);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user