Racepicks: Use new date format helpers
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 50s
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 50s
This commit is contained in:
@ -19,7 +19,7 @@
|
|||||||
RACE_PICTOGRAM_HEIGHT,
|
RACE_PICTOGRAM_HEIGHT,
|
||||||
RACE_PICTOGRAM_WIDTH,
|
RACE_PICTOGRAM_WIDTH,
|
||||||
} from "$lib/config";
|
} from "$lib/config";
|
||||||
import { format_date } from "$lib/date";
|
import { format_date, shortdatetimeformat } from "$lib/date";
|
||||||
import type { CurrentPickedUser, RacePick } from "$lib/schema";
|
import type { CurrentPickedUser, RacePick } from "$lib/schema";
|
||||||
import { get_by_value, get_driver_headshot_template } from "$lib/database";
|
import { get_by_value, get_driver_headshot_template } from "$lib/database";
|
||||||
|
|
||||||
@ -53,8 +53,6 @@
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const dateformat: string = "dd.MM' 'HH:mm";
|
|
||||||
|
|
||||||
const race_popupsettings = (target: string): PopupSettings => {
|
const race_popupsettings = (target: string): PopupSettings => {
|
||||||
return {
|
return {
|
||||||
event: "click",
|
event: "click",
|
||||||
@ -87,20 +85,21 @@
|
|||||||
{#if data.currentrace.sprintdate}
|
{#if data.currentrace.sprintdate}
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<span class="w-12">SQuali:</span>
|
<span class="w-12">SQuali:</span>
|
||||||
<span>{format_date(data.currentrace.sprintqualidate, dateformat)}</span>
|
<span>{format_date(data.currentrace.sprintqualidate, shortdatetimeformat)}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<span class="w-12">SRace:</span>
|
<span class="w-12">SRace:</span>
|
||||||
<span>{format_date(data.currentrace.sprintdate, dateformat)}</span>
|
<span>{format_date(data.currentrace.sprintdate, shortdatetimeformat)}</span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<span class="w-12">Quali:</span>
|
<span class="w-12">Quali:</span>
|
||||||
<span>{format_date(data.currentrace.qualidate, dateformat)}</span>
|
<span>{format_date(data.currentrace.qualidate, shortdatetimeformat)}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<span class="w-12">Race:</span>
|
<span class="w-12">Race:</span>
|
||||||
<span>{format_date(data.currentrace.racedate, dateformat)}</span>
|
<span>{format_date(data.currentrace.racedate, shortdatetimeformat)}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-auto flex">
|
<div class="m-auto flex">
|
||||||
<div class="mr-1 mt-1">
|
<div class="mr-1 mt-1">
|
||||||
@ -255,7 +254,7 @@
|
|||||||
{race?.step}: {race?.name}
|
{race?.step}: {race?.name}
|
||||||
</span>
|
</span>
|
||||||
<span class="hidden text-sm lg:block">
|
<span class="hidden text-sm lg:block">
|
||||||
Date: {format_date(race?.racedate ?? "", dateformat)}
|
Date: {format_date(race?.racedate ?? "", shortdatetimeformat)}
|
||||||
</span>
|
</span>
|
||||||
<span class="hidden text-sm lg:block">Guessed: P{race?.pxx}</span>
|
<span class="hidden text-sm lg:block">Guessed: P{race?.pxx}</span>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user