Date formats are hard-coded in
|
if 4 <= date.day <= 20 or 24 <= date.day <= 30: |
|
suffix = "th" |
|
else: |
|
suffix = ["st", "nd", "rd"][date.day % 10 - 1] |
|
|
|
article_date = date.strftime("%%-d%s of %%B %%Y" % suffix) |
Special functions should be provided per-language.