Categories > TinyButStrong general >

date format

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Will Robertson
Date: 2003-06-11
Time: 00:15

date format

[news.news_date;block=table;extend=2;frm='dddd mmmm d yyyy @ hh:nn']

which produces:
Friday January 10 2003 @ 22:52

however, I can't figure out how to get the result:
Friday January 10th 2003 @ 22:52

just that simple th and nd seem to be tripping me up. Any advice?

Thanks,
Will Robertson

By: Skrol29
Date: 2003-06-11
Time: 02:27

Re: date format

Hi Will,

The english ordinal suffix for the day of the month (st, nd, rd or th) are not supported yet in format strings.
I will add this in the next version.

Ante meridiem and Post meridiem will be supported too.

With the current version (1.80) you can use the 'onformat' parameter to apply your custom format. 'onformat' enables you to use an event Php function to edit the value as you wish.