summaryrefslogtreecommitdiff
path: root/qa/qa/support
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-07 15:05:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-07 15:05:59 +0000
commit31040b5bfe48f8d73830f473513164427522b3a6 (patch)
tree6301b395ad45d7a0f84aa0f9c31373889208d09b /qa/qa/support
parent185f428fa5e6123ffa0f29e307523da138e7b028 (diff)
downloadgitlab-ce-31040b5bfe48f8d73830f473513164427522b3a6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/support')
-rw-r--r--qa/qa/support/dates.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/qa/support/dates.rb b/qa/qa/support/dates.rb
new file mode 100644
index 00000000000..47fc721afc1
--- /dev/null
+++ b/qa/qa/support/dates.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+module QA
+ module Support
+ module Dates
+ def current_date_yyyy_mm_dd
+ current_date.strftime("%Y/%m/%d")
+ end
+
+ def next_month_yyyy_mm_dd
+ current_date.next_month.strftime("%Y/%m/%d")
+ end
+
+ private
+
+ def current_date
+ DateTime.now
+ end
+ end
+ end
+end