Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Date formatting / postDate

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I'd like to format the date in the Forum List and elsewhere (e.g. lpi.postDate). Is there a way to format it right in the .htm template file?

Best,
Michael
[originally posted on jforum.net by smi]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can set the date format used in your jforum-custom.conf file with the dateTime.format property. E.g.:

dateTime.format = dd MMM yy HH\:mm zzz

Will produce: 28 Mar 07 9:45 EDT

Note the time zone / month name are based on your server's locale setting.

The format string is used by the Java SimpleDateFormat class. See the Javadocs for this for details on all the formatting elements.
[originally posted on jforum.net by monroe]
reply
    Bookmark Topic Watch Topic
  • New Topic