Commit 966bbb9f authored by Fatih Acet's avatar Fatih Acet

Merge branch 'build-expire-sidebar' into 'master'

Correctly parse the date of artifact expiring

## What does this MR do?

Previously the JS was just replacing `-` with `/` however this was breaking when there is a timezone offset.

## What are the relevant issue numbers?

Closes #19600

See merge request !6697
parents 4bc27cd1 ea2f9a60
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
$date = $('.js-artifacts-remove'); $date = $('.js-artifacts-remove');
if ($date.length) { if ($date.length) {
date = $date.text(); date = $date.text();
return $date.text($.timefor(new Date(date.replace(/-/g, '/')), ' ')); return $date.text($.timefor(new Date(date.replace(/([0-9]+)-([0-9]+)-([0-9]+)/g, '$1/$2/$3')), ' '));
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment