File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 33 import Header from ' $components/base/Header.svelte' ;
44 import Seo from ' $components/seo/Seo.svelte' ;
55 import type { PageData } from ' ./$types' ;
6+ import { formatDate } from ' $lib/util/html' ;
67
78 export let data: PageData ;
89 </script >
1920 <!-- TODO: Make the below a component -->
2021 <div class =" flex flex-col gap-3 py-9 md:py-0" >
2122 <!-- Date -->
22- <span
23- >{new Date (post .metadata .date ).toLocaleDateString (' en-US' , {
24- year: ' numeric' ,
25- month: ' long' ,
26- day: ' numeric' ,
27- })}</span
28- >
23+ <span >{formatDate (new Date (data .metadata .date ))}</span >
2924
3025 <!-- Title -->
3126 <h2 class ="text-2xl font-bold" >{post .metadata .title }</h2 >
Original file line number Diff line number Diff line change 1919
2020 <div class =" flex grow flex-col gap-3 border-b border-b-white/[15%] py-9" >
2121 <!-- Date -->
22- <span >{formatDate (data .metadata .date )}</span >
22+ <span >{formatDate (new Date ( data .metadata .date ) )}</span >
2323
2424 <!-- Title -->
2525 <h2 class ="text-2xl font-bold" >{data .metadata .title }</h2 >
You can’t perform that action at this time.
0 commit comments