Skip to content

Commit

Permalink
Add format without seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
vertism committed Mar 5, 2025
1 parent 925cc14 commit 999aac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/dashboard/_question_data_commissioned.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- if question.internal_deadline
h3.govuk-heading-s Internal deadline:
p.govuk-body.deadline-date.text
= question.internal_deadline.to_formatted_s(:db)
= question.internal_deadline.to_formatted_s(:no_seconds)
= render partial: 'shared/deadline_time', locals: {internal_deadline: question.internal_deadline, is_closed: question.closed?, draft_reply: question.draft_answer_received}
h3.govuk-heading-s Replying minister:
p.govuk-body.replying-minister
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/time_formats.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Time::DATE_FORMATS[:default] = "%d/%m/%Y %H:%M"
Time::DATE_FORMATS[:wordy] = "on <strong>%d/%m/%Y</strong> at <strong>%H:%M</strong>"
Time::DATE_FORMATS[:db] = "%Y-%m-%d %H:%M"
Time::DATE_FORMATS[:db] = "%Y-%m-%d %H:%M:%S"
Time::DATE_FORMATS[:no_seconds] = "%Y-%m-%d %H:%M"
Time::DATE_FORMATS[:export] = "%Y-%m-%d %H:%M"
Time::DATE_FORMATS[:date] = "%d/%m/%Y"

0 comments on commit 999aac8

Please sign in to comment.