[+comment.createdon:date=`%d`+] [+comment.createdon:date=`%d`:gt=`10`:and:lt=`20`:then=`th`:else=` [+phx:math=`[+comment.createdon:date=`%d`+]%10`:is=`0`:then=`th`+] [+phx:math=`[+comment.createdon:date=`%d`+]%10`:is=`1`:then=`st`+] [+phx:math=`[+comment.createdon:date=`%d`+]%10`:is=`2`:then=`nd`+] [+phx:math=`[+comment.createdon:date=`%d`+]%10`:is=`3`:then=`rd`+] [+phx:math=`[+comment.createdon:date=`%d`+]%10`:gt=`3`:then=`th`+] `+]
works like a charm.