Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0b3e12fc
Commit
0b3e12fc
authored
Sep 16, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix naming of constant
parent
065304dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/time_tracking_formatter.rb
lib/gitlab/time_tracking_formatter.rb
+3
-3
No files found.
lib/gitlab/time_tracking_formatter.rb
View file @
0b3e12fc
...
...
@@ -5,7 +5,7 @@ module Gitlab
extend
self
# 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
)
string
=
string
.
sub
(
/\A-/
,
''
)
...
...
@@ -14,7 +14,7 @@ module Gitlab
begin
ChronicDuration
.
parse
(
string
,
CUSTOM_DAY_AND_
WEEK
_LENGTH
.
merge
(
default_unit:
'hours'
))
CUSTOM_DAY_AND_
MONTH
_LENGTH
.
merge
(
default_unit:
'hours'
))
rescue
nil
end
...
...
@@ -26,7 +26,7 @@ module Gitlab
def
output
(
seconds
)
ChronicDuration
.
output
(
seconds
,
CUSTOM_DAY_AND_
WEEK
_LENGTH
.
merge
(
CUSTOM_DAY_AND_
MONTH
_LENGTH
.
merge
(
format: :short
,
limit_to_hours:
limit_to_hours_setting
,
weeks:
true
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment