File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
apps/webapp/app/components/runs/v3 Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,17 @@ export function timeFilterRenderValues({
246246 break ;
247247 }
248248 case "range" :
249- valueLabel = (
250- < span >
251- < DateTime date = { from ! } includeTime includeSeconds /> –{ " " }
252- < DateTime date = { to ! } includeTime includeSeconds />
253- </ span >
254- ) ;
249+ {
250+ //If the day is the same, only show the time for the `to` date
251+ const isSameDay = from && to && from . getDate ( ) === to . getDate ( ) ;
252+
253+ valueLabel = (
254+ < span >
255+ < DateTime date = { from ! } includeTime includeSeconds /> –{ " " }
256+ < DateTime date = { to ! } includeTime includeSeconds includeDate = { ! isSameDay } />
257+ </ span >
258+ ) ;
259+ }
255260 break ;
256261 case "from" :
257262 valueLabel = < DateTime date = { from ! } includeTime includeSeconds /> ;
@@ -859,10 +864,9 @@ export function appliedSummary(values: string[], maxValues = 3) {
859864export function dateFromString ( value : string | undefined | null ) : Date | undefined {
860865 if ( ! value ) return ;
861866
862- //is it an int?
863- const int = parseInt ( value ) ;
864- if ( ! isNaN ( int ) ) {
865- return new Date ( int ) ;
867+ // Only treat as timestamp if the string is purely numeric
868+ if ( / ^ \d + $ / . test ( value ) ) {
869+ return new Date ( parseInt ( value ) ) ;
866870 }
867871
868872 return new Date ( value ) ;
You can’t perform that action at this time.
0 commit comments