Skip to content

Commit

Permalink
Use noon and midnight for deadline time if 12
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDancingClown committed Aug 25, 2023
1 parent 617ab85 commit 3ef7cfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/mailers/account_mailers/reminder_to_submit_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ def notify(form_answer_id, collaborator_id)
@user = @form_answer.user

submission_deadline = Settings.current_submission_deadline
@deadline = submission_deadline.strftime("%l%P on %A %d %B %Y")
deadline_time = formatted_deadline_time(submission_deadline)
deadline_date = submission_deadline.trigger_at.strftime("%A %d %B %Y")
@deadline = "#{deadline_time} on #{deadline_date}"

ordinal = submission_deadline.trigger_at.day.ordinal
subject_deadline = submission_deadline.strftime("%e#{ordinal} %B")
Expand Down
3 changes: 2 additions & 1 deletion app/renderers/mail_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def reminder_to_submit

assigns[:user] = dummy_user("Jon", "Doe", "Jane's Company")
assigns[:form_answer] = form_answer
assigns[:deadline] = deadline_str("submission_end", "%I%P on %A %d %B %Y")
deadline_time = deadline_time("submission_end")
assigns[:deadline] = deadline_str("submission_end", "#{deadline_time} on %A %d %B %Y")

render(assigns, "account_mailers/reminder_to_submit_mailer/preview/notify")
end
Expand Down

0 comments on commit 3ef7cfc

Please sign in to comment.