summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-05 17:54:48 +0000
committerFatih Acet <acetfatih@gmail.com>2016-10-05 17:54:48 +0000
commit966bbb9f3110e1bb390334653caedec55cc8c6a3 (patch)
treedca7ad2c0106850899c4eab15ca67dbfd2535ba4 /app/assets/javascripts
parent4bc27cd17b304abce01fad1fce56fce32a4ee099 (diff)
parentea2f9a6083b584a2e5050628ff17bed3c0576222 (diff)
downloadgitlab-ce-966bbb9f3110e1bb390334653caedec55cc8c6a3.tar.gz
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
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/build.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 78d21c0552a..f336bfc36d6 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -146,7 +146,7 @@
$date = $('.js-artifacts-remove');
if ($date.length) {
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')), ' '));
}
};