Skip to content

Commit c7bf6c1

Browse files
committed
fix: Ipswich Borough Council
fix: #1548
1 parent c4d026b commit c7bf6c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uk_bin_collection/uk_bin_collection/councils/IpswichBoroughCouncil.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class CouncilClass(AbstractGetBinDataClass):
3131
IBC_ENDPOINT = "https://app.ipswich.gov.uk/bin-collection/"
3232

3333
def transform_date(self, date_str):
34-
date_str = re.sub(r"(st|nd|rd|th)", "", date_str) # Remove ordinal suffixes
34+
date_str = re.sub(
35+
r"(\d{1,2})(st|nd|rd|th)", r"\1", date_str
36+
) # Remove ordinal suffixes
3537
date_obj = datetime.strptime(date_str, "%A %d %B %Y")
3638
return date_obj.strftime(date_format)
3739

0 commit comments

Comments
 (0)