diff --git a/Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs b/Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs index 72a07de6f..c20673a9e 100644 --- a/Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs +++ b/Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs @@ -123,7 +123,7 @@ public static string RemoveNonAlphanumericOrWhiteSpace(this string str) } public static string ToFormattedDate(this string dateStr) { - if (DateTime.TryParse(dateStr, out DateTime date, )) + if (DateTime.TryParse(dateStr, out DateTime date)) { return date.ToString("d MMMM yyyy"); } diff --git a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml index 876559bb5..442e29d1f 100644 --- a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml +++ b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml @@ -1,4 +1,5 @@ @page "{urn}/transfer-dates/reason" +@using Dfe.PrepareTransfers.Helpers @using Dfe.PrepareTransfers.Web.ExtensionMethods @model Dfe.PrepareTransfers.Web.Pages.Projects.TransferDates.Reason @{ @@ -23,7 +24,7 @@ Reasons for transfer date change -
The new proposed transfer date is @Model.TargetDate.ToFormattedDate().
+The new proposed transfer date is @DatesHelper.DateStringToGovUkDate(Model.TargetDate).