Skip to content

Commit

Permalink
Apply date format to IDescriptable
Browse files Browse the repository at this point in the history
  • Loading branch information
shandybob76 committed Nov 29, 2024
1 parent 30d02bc commit 79ea8b1
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 79ea8b1

Please sign in to comment.