mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 18:09:40 +05:00
fix: anime season info
This commit is contained in:
parent
0dad587611
commit
3c95fa3c3e
2 changed files with 33 additions and 35 deletions
|
@ -144,15 +144,6 @@ export function unixToDate(
|
|||
);
|
||||
}
|
||||
|
||||
export const getSeasonFromUnix = (unix: number) => {
|
||||
const date = new Date(unix * 1000);
|
||||
const month = date.getMonth();
|
||||
if (month >= 3 && month <= 5) return "весна";
|
||||
if (month >= 6 && month <= 8) return "лето";
|
||||
if (month >= 9 && month <= 11) return "осень";
|
||||
return "зима";
|
||||
};
|
||||
|
||||
export function sinceUnixDate(unixInSeconds: number) {
|
||||
const unix = Math.floor(unixInSeconds * 1000);
|
||||
const date = new Date(unix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue