File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ export const Event: React.FC<EventProps> = ({
5656 const end = new Date ( endTimestamp ) ;
5757 const endTime = end . toLocaleTimeString ( "de-DE" ) . substring ( 0 , 5 ) ;
5858 const endDate = end . toISOString ( ) . split ( "T" ) [ 0 ] ;
59+ const oneDayEvent = start . getDate ( ) === end . getDate ( ) && start . getMonth ( ) === end . getMonth ( ) && start . getFullYear ( ) === end . getFullYear ( ) ;
5960
6061 if ( startTimestamp > endTimestamp ) {
6162 throw new Error (
@@ -108,7 +109,7 @@ export const Event: React.FC<EventProps> = ({
108109 < h4 className = "font-semibold dark:text-white text-gray-900" >
109110 { title }
110111 </ h4 >
111- < p className = "text-sm dark:text-gray-300 text-gray-500" > { } </ p >
112+ < p className = "text-sm dark:text-gray-300 text-gray-500" > { oneDayEvent ? start . toLocaleDateString ( "de-DE" ) : ` ${ start . toLocaleDateString ( "de-DE" ) } - ${ end . toLocaleDateString ( "de-DE" ) } ` } </ p >
112113 </ div >
113114 </ div >
114115 < Badge
You can’t perform that action at this time.
0 commit comments