mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 06:05:28 +00:00
fix: refactor, docker, dateformatter
This commit is contained in:
12
src/lib/dateFormatter.ts
Normal file
12
src/lib/dateFormatter.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export const formatDate = (dateString: string): string => {
|
||||
const date = new Date(dateString);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}/${month}/${day}`;
|
||||
};
|
||||
|
||||
export const formatTime = (timeString: string): string => {
|
||||
const [hours, minutes] = timeString.split(':');
|
||||
return `${hours}:${minutes}`;
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
export type EventType = 'limited' | 'unlimited';
|
||||
export type EventVisibility = 'public' | 'private';
|
||||
export type ActionType = 'add' | 'remove';
|
||||
|
||||
export interface Event {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user