mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-29 01:19:41 +05:00
feat: add popular comments viewing to the release page
This commit is contained in:
parent
237581a49c
commit
b9b0590dfe
5 changed files with 182 additions and 10 deletions
|
@ -114,9 +114,10 @@ const months = [
|
|||
"дек.",
|
||||
];
|
||||
|
||||
export function unixToDate(unix: number) {
|
||||
export function unixToDate(unix: number, type: string = "short") {
|
||||
const date = new Date(unix * 1000);
|
||||
return date.getDate() + " " + months[date.getMonth()] + " " + date.getFullYear();
|
||||
if (type === "short") return date.getDate() + " " + months[date.getMonth()] + " " + date.getFullYear();
|
||||
if (type === "full") return date.getDate() + " " + months[date.getMonth()] + " " + date.getFullYear() + ", " + date.getHours() + ":" + date.getMinutes();
|
||||
}
|
||||
|
||||
export const getSeasonFromUnix = (unix: number) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue