Skip to content

Commit

Permalink
Merge pull request #215 from shandybob76/Apply-Date-Format-To-IDescri…
Browse files Browse the repository at this point in the history
…ptable

Apply date format to IDescriptable
  • Loading branch information
kevbite authored Dec 6, 2024
2 parents 4953da5 + 79ea8b1 commit 01d7898
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/CompaniesHouse/Description/IDescriptable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
public interface IDescriptable
{
string GetDescription(string format);
string GetDescription(string format, string dateFormat = null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 01d7898

Please sign in to comment.