init
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { format } from "date-fns";
|
||||
import { pl } from "date-fns/locale";
|
||||
|
||||
export function formatDate(date: Date): string {
|
||||
return format(date, "d MMMM yyyy, HH:mm", { locale: pl });
|
||||
export function formatDate(date: Date | string): string {
|
||||
return format(new Date(date), "d MMMM yyyy, HH:mm", { locale: pl });
|
||||
}
|
||||
|
||||
export function formatDateShort(date: Date): string {
|
||||
return format(date, "d MMM yyyy", { locale: pl });
|
||||
export function formatDateShort(date: Date | string): string {
|
||||
return format(new Date(date), "d MMM yyyy", { locale: pl });
|
||||
}
|
||||
|
||||
export function formatDuration(seconds: number): string {
|
||||
|
||||
Reference in New Issue
Block a user