Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #796 from DFE-Digital/feature/transfer-dates-and-h…
Browse files Browse the repository at this point in the history
…istory

Using govukdatehlper
  • Loading branch information
dneed-nimble authored Jul 10, 2024
2 parents 3f0b616 + 012fb50 commit a03a36c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, ))

Check failure on line 126 in Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Invalid expression term ')'

Check failure on line 126 in Dfe.PrepareTransfers.Web/ExtensionMethods/StringExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Invalid expression term ')'
{
return date.ToString("d MMMM yyyy");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@page "/project/{urn}/transfer-dates/target-date"
@using Dfe.PrepareTransfers.Helpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using Dfe.PrepareTransfers.Web.ExtensionMethods
@using Dfe.PrepareTransfers.Web.Dfe.PrepareTransfers.Helpers.TagHelpers
Expand Down Expand Up @@ -97,7 +98,7 @@
Proposed transfer date
</h1>
</legend>
<p class="govuk-body">The current proposed transfer date is <strong>@Model.ExistingTargetDate.ToFormattedDate().</strong></p>
<p class="govuk-body">The current proposed transfer date is <strong>@DatesHelper.DateStringToGovUkDate(Model.ExistingTargetDate)</strong></p>
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l" aria-describedby="set-ab-date-hint">
<h1 class="govuk-fieldset__heading" id="AdvisoryBoardViewModel_AdvisoryBoardDate_Date">
Enter new proposed transfer date
Expand Down

0 comments on commit a03a36c

Please sign in to comment.