From 79ea8b15bf257297a2cd9ca23019c0c6e1eaf6d1 Mon Sep 17 00:00:00 2001 From: Rob Vining Date: Fri, 29 Nov 2024 14:16:25 +0000 Subject: [PATCH] Apply date format to IDescriptable --- src/CompaniesHouse/Description/IDescriptable.cs | 2 +- .../Response/CompanyFiling/FilingHistoryItem.cs | 4 ++-- .../Response/CompanyFiling/FilingHistoryItemAnnotation.cs | 4 ++-- .../Response/CompanyFiling/FilingHistoryItemResolution.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CompaniesHouse/Description/IDescriptable.cs b/src/CompaniesHouse/Description/IDescriptable.cs index 1e27c2f..7f1f12c 100644 --- a/src/CompaniesHouse/Description/IDescriptable.cs +++ b/src/CompaniesHouse/Description/IDescriptable.cs @@ -2,6 +2,6 @@ { public interface IDescriptable { - string GetDescription(string format); + string GetDescription(string format, string dateFormat = null); } } diff --git a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItem.cs b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItem.cs index 00d698e..bb1eb50 100644 --- a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItem.cs +++ b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItem.cs @@ -53,9 +53,9 @@ public class FilingHistoryItem : IDescriptable [JsonProperty(PropertyName = "links")] public Links Links { get; set; } - public string GetDescription(string format) + public string GetDescription(string format, string dateFormat = null) { - return DescriptionProvider.GetDescription(format, DescriptionValues); + return DescriptionProvider.GetDescription(format, DescriptionValues, dateFormat); } } } diff --git a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemAnnotation.cs b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemAnnotation.cs index d0bb06e..51abd79 100644 --- a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemAnnotation.cs +++ b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemAnnotation.cs @@ -19,9 +19,9 @@ public class FilingHistoryItemAnnotation : IDescriptable [JsonProperty(PropertyName = "description_values")] private JObject DescriptionValues { get; set; } - public string GetDescription(string format) + public string GetDescription(string format, string dateFormat = null) { - return DescriptionProvider.GetDescription(format, DescriptionValues); + return DescriptionProvider.GetDescription(format, DescriptionValues, dateFormat); } } } diff --git a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemResolution.cs b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemResolution.cs index 3a79407..2eb4b7f 100644 --- a/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemResolution.cs +++ b/src/CompaniesHouse/Response/CompanyFiling/FilingHistoryItemResolution.cs @@ -32,9 +32,9 @@ public class FilingHistoryItemResolution : IDescriptable [JsonProperty(PropertyName = "description_values")] private JObject DescriptionValues { get; set; } - public string GetDescription(string format) + public string GetDescription(string format, string dateFormat = null) { - return DescriptionProvider.GetDescription(format, DescriptionValues); + return DescriptionProvider.GetDescription(format, DescriptionValues, dateFormat); } } }