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> = ({
56
56
const end = new Date ( endTimestamp ) ;
57
57
const endTime = end . toLocaleTimeString ( "de-DE" ) . substring ( 0 , 5 ) ;
58
58
const endDate = end . toISOString ( ) . split ( "T" ) [ 0 ] ;
59
+ const oneDayEvent = start . getDate ( ) === end . getDate ( ) && start . getMonth ( ) === end . getMonth ( ) && start . getFullYear ( ) === end . getFullYear ( ) ;
59
60
60
61
if ( startTimestamp > endTimestamp ) {
61
62
throw new Error (
@@ -108,7 +109,7 @@ export const Event: React.FC<EventProps> = ({
108
109
< h4 className = "font-semibold dark:text-white text-gray-900" >
109
110
{ title }
110
111
</ 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 >
112
113
</ div >
113
114
</ div >
114
115
< Badge
You can’t perform that action at this time.
0 commit comments