Python CGI using "st", "nd", "rd" and "th"

32 views Asked by At

Ok so I've been looking around for the last couple of hours now on how to make it so that the outputted date would produce an ordinal date. So then when the date it outputted it would should the "st", "nd", "rd" or "th" all depending on the the date. This is what I need to alter to make it but I cannot find out anywhere how to do it.

print ("Easter falls on the %d of %s %d." % (p,n,y))

All of the values are fine as they are I just need to know where I need to place the code to do what I need. I believe it has something to do with ordinal number/indicators, not sure which one. Thanks if you're able to help with this.

0

There are 0 answers