I forgot how to format Unix timestamps with TypoScript. Here’s my findings using today’s date.
The first code snippet, is years old. The second TypoScript snippet comes from my deeper reading of the TypoScript Reference documentation in my want to write “better” code.
“old” today’s date TypoScript
lib.date = TEXT lib.date { data = date:U strftime = %B %e, %Y wrap = Today is | }
“new” today’s date TypoScript
lib.date = TEXT lib.date { data = date:F j, Y noTrimWrap = |Today is || }
References
- TEXT
- PHP strftime
- data (date-conf, getText)
- PHP date
- noTrimWrap
Originally posted January 27, 2009. Revised and link checked.