From 4b218e759f443fb333625bfca45a8bb00308a99d Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 24 Jun 2024 08:13:51 +0100 Subject: [PATCH] Update upcoming deadlines dates (#2462) --- app/helpers/collection_time_helper.rb | 1 - app/views/home/_upcoming_deadlines.html.erb | 12 ++++++------ spec/helpers/collection_time_helper_spec.rb | 7 ------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/app/helpers/collection_time_helper.rb b/app/helpers/collection_time_helper.rb index 4381aa43a..809cae5e7 100644 --- a/app/helpers/collection_time_helper.rb +++ b/app/helpers/collection_time_helper.rb @@ -52,7 +52,6 @@ module CollectionTimeHelper def quarter_for_date(date: Time.zone.now) quarters = [ - { quarter: "Q3", cutoff_date: Time.zone.local(2024, 1, 12), start_date: Time.zone.local(2023, 10, 1), end_date: Time.zone.local(2023, 12, 31) }, { quarter: "Q1", cutoff_date: Time.zone.local(2024, 7, 12), start_date: Time.zone.local(2024, 4, 1), end_date: Time.zone.local(2024, 6, 30) }, { quarter: "Q2", cutoff_date: Time.zone.local(2024, 10, 11), start_date: Time.zone.local(2024, 7, 1), end_date: Time.zone.local(2024, 9, 30) }, { quarter: "Q3", cutoff_date: Time.zone.local(2025, 1, 10), start_date: Time.zone.local(2024, 10, 1), end_date: Time.zone.local(2024, 12, 31) }, diff --git a/app/views/home/_upcoming_deadlines.html.erb b/app/views/home/_upcoming_deadlines.html.erb index 7f0de9667..dbed05bfd 100644 --- a/app/views/home/_upcoming_deadlines.html.erb +++ b/app/views/home/_upcoming_deadlines.html.erb @@ -21,13 +21,13 @@

Prioritise completing logs for the closing collection year. You must complete all <%= previous_lettings_form.start_date.year %> to <%= previous_lettings_form.submission_deadline.year %> logs must by the end-of-year deadline. You can still create <%= open_lettings_form.start_date.year %> to <%= open_lettings_form.submission_deadline.year %> logs for this quarter after the quarterly cut-off date.

<% end %> -<%= govuk_details(summary_text: "Quarterly cut-off dates for 2023 to 2024") do %> -

The 2023 to 2024 quarterly cut-off dates are:

+<%= govuk_details(summary_text: "Quarterly cut-off dates for 2024 to 2025") do %> +

The 2024 to 2025 quarterly cut-off dates are:

It is important that you meet these cut-off dates because we submit data to the Office for National Statistics quarterly, helping them create essential inflation statistics.

Meeting these cut-off dates also gives you more accurate data for your own analysis, and reduces the burden at the end of the year.

diff --git a/spec/helpers/collection_time_helper_spec.rb b/spec/helpers/collection_time_helper_spec.rb index e659706de..bffc492c6 100644 --- a/spec/helpers/collection_time_helper_spec.rb +++ b/spec/helpers/collection_time_helper_spec.rb @@ -108,13 +108,6 @@ RSpec.describe CollectionTimeHelper do end describe "#quarter_for_date" do - it "returns correct cutoff date for curent quarter" do - quarter = quarter_for_date(date: Time.zone.local(2023, 10, 1)) - expect(quarter.cutoff_date).to eq(Time.zone.local(2024, 1, 12)) - expect(quarter.quarter_start_date).to eq(Time.zone.local(2023, 10, 1)) - expect(quarter.quarter_end_date).to eq(Time.zone.local(2023, 12, 31)) - end - it "returns correct cutoff date for the first quarter of 2024/25" do quarter = quarter_for_date(date: Time.zone.local(2024, 4, 1)) expect(quarter.cutoff_date).to eq(Time.zone.local(2024, 7, 12))