Commit 91ac5c7b authored by James Edwards-Jones's avatar James Edwards-Jones

Issues CSV time formats use to_s

parent fa903956
...@@ -13,9 +13,9 @@ columns = { ...@@ -13,9 +13,9 @@ columns = {
'Author' => 'author_name', 'Author' => 'author_name',
'Assignee' => 'assignee_name', 'Assignee' => 'assignee_name',
'Confidential' => 'confidential', 'Confidential' => 'confidential',
'Due Date' => -> (issue) { issue.due_date&.strftime('%Y-%m-%d') }, 'Due Date' => -> (issue) { issue.due_date&.to_s(:csv) },
'Created At (UTC)' => -> (issue) { issue.created_at&.strftime('%Y-%m-%d %H:%M:%S') }, 'Created At (UTC)' => -> (issue) { issue.created_at&.to_s(:csv) },
'Updated At (UTC)' => -> (issue) { issue.updated_at&.strftime('%Y-%m-%d %H:%M:%S') }, 'Updated At (UTC)' => -> (issue) { issue.updated_at&.to_s(:csv) },
'Milestone' => -> (issue) { issue.milestone&.title }, 'Milestone' => -> (issue) { issue.milestone&.title },
'Labels' => -> (issue) { labels[issue.id].sort.join(',').presence } 'Labels' => -> (issue) { labels[issue.id].sort.join(',').presence }
} }
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
# :medium - Nov 10, 2007 # :medium - Nov 10, 2007
# :long - November 10, 2007 # :long - November 10, 2007
Date::DATE_FORMATS[:medium] = '%b %-d, %Y' Date::DATE_FORMATS[:medium] = '%b %-d, %Y'
Date::DATE_FORMATS[:csv] = '%Y-%m-%d'
# :short - 18 Jan 06:10 # :short - 18 Jan 06:10
# :medium - Jan 18, 2007 6:10am # :medium - Jan 18, 2007 6:10am
# :long - January 18, 2007 06:10 # :long - January 18, 2007 06:10
Time::DATE_FORMATS[:medium] = '%b %-d, %Y %-I:%M%P' Time::DATE_FORMATS[:medium] = '%b %-d, %Y %-I:%M%P'
Time::DATE_FORMATS[:csv] = '%Y-%m-%d %H:%M:%S'
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