diff --git a/src/routes/(rezepte)/rezepte/[name]/+page.svelte b/src/routes/(rezepte)/rezepte/[name]/+page.svelte index 3a2034d..98f2569 100644 --- a/src/routes/(rezepte)/rezepte/[name]/+page.svelte +++ b/src/routes/(rezepte)/rezepte/[name]/+page.svelte @@ -58,6 +58,18 @@ placeholder_src = "https://bocken.org/static/rezepte/placeholder/" + data.short_name + ".webp" season_iv = season_intervals(); }) + let display_date = new Date(data.createdAt); + if (data.updatedAt){ + display_date = new Date(data.updatedAt); + } + const options = { + day: '2-digit', + month: 'short', // German abbreviation for the month + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + }; + const formatted_display_date = display_date.toLocaleDateString('de-DE', options) {stripHtmlTags(data.name)} - Bocken'sche Rezepte @@ -261,6 +276,7 @@ h4{ {#if data.note} + d {/if} @@ -274,6 +290,11 @@ h4{ {@html data.addendum} {/if} + {#if data.updatedAt} +

Letzte Ă„nderung: {formatted_display_date}

+ {:else} +

Erstellt am: {formatted_display_date}

+ {/if}