Commit 58f0af10 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'fix-wrong-constant-name' into 'master'

Fix naming of constant

See merge request gitlab-org/gitlab!16769
parents defc3518 0b3e12fc
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
extend self extend self
# We may want to configure it through project settings in a future version. # We may want to configure it through project settings in a future version.
CUSTOM_DAY_AND_WEEK_LENGTH = { hours_per_day: 8, days_per_month: 20 }.freeze CUSTOM_DAY_AND_MONTH_LENGTH = { hours_per_day: 8, days_per_month: 20 }.freeze
def parse(string) def parse(string)
string = string.sub(/\A-/, '') string = string.sub(/\A-/, '')
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
begin begin
ChronicDuration.parse( ChronicDuration.parse(
string, string,
CUSTOM_DAY_AND_WEEK_LENGTH.merge(default_unit: 'hours')) CUSTOM_DAY_AND_MONTH_LENGTH.merge(default_unit: 'hours'))
rescue rescue
nil nil
end end
...@@ -26,7 +26,7 @@ module Gitlab ...@@ -26,7 +26,7 @@ module Gitlab
def output(seconds) def output(seconds)
ChronicDuration.output( ChronicDuration.output(
seconds, seconds,
CUSTOM_DAY_AND_WEEK_LENGTH.merge( CUSTOM_DAY_AND_MONTH_LENGTH.merge(
format: :short, format: :short,
limit_to_hours: limit_to_hours_setting, limit_to_hours: limit_to_hours_setting,
weeks: true)) weeks: true))
......
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