mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-28 10:26:12 +01:00
Add basic activity log (#141)
* Add basic activity log * Add database migration * Fix layout * Fix types --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
@@ -10,9 +10,15 @@ export function delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
export function formatExpenseDate(date: Date) {
|
||||
return date.toLocaleDateString('en-US', {
|
||||
dateStyle: 'medium',
|
||||
export type DateTimeStyle = NonNullable<
|
||||
ConstructorParameters<typeof Intl.DateTimeFormat>[1]
|
||||
>['dateStyle']
|
||||
export function formatDate(
|
||||
date: Date,
|
||||
options: { dateStyle?: DateTimeStyle; timeStyle?: DateTimeStyle } = {},
|
||||
) {
|
||||
return date.toLocaleString('en-GB', {
|
||||
...options,
|
||||
timeZone: 'UTC',
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user