[opencms-dev] How to change the date format?

Jonathan Woods jonathan.woods at scintillance.com
Thu Jan 25 14:55:36 CET 2007


I guess you're showing content using <cms:contentshow> or something like
that, then?  The alternative is to extract the value yourself - into a
String, if that's the only way JSTL and the OpenCms taglib will let you, and
parse it to a Date then back out again.  I don't use <contentload> and
<contentshow> myself, nor the JSTL, so I'm afraid I can't be of much help
here - someone else?

Jon

-----Original Message-----
From: sfdbfoui at host2.scintillance.com
[mailto:sfdbfoui at host2.scintillance.com] On Behalf Of Samir Djulancic
Sent: 25 January 2007 11:37
To: The OpenCms mailing list
Subject: RE: [opencms-dev] How to change the date format?

Hey Jon,

it is so.. It's about the date format showed on the website (from news and
events). When I need to write a bit of Java that's ok. But I thought of just
changing the existing file where the date format is declared. Is this
possible or is the format taken from a standard library and if I want some
"special" I have to write something by myself? If so I'm wondering about the
format now. It shows like: 01/25/07 and this is definitely no swedish format
(that's were I'm writing from)..

Thanks a lot for your help

Samir

 
-------- Original-Nachricht --------
Datum: Thu, 25 Jan 2007 11:26:16 -0000
Von: "Jonathan Woods" <jonathan.woods at scintillance.com>
An: "\'The OpenCms mailing list\'" <opencms-dev at opencms.org>
Betreff: RE: [opencms-dev] How to change the date format?

> Samir -
> 
> In what context are you talking about dates, then?  Is it in how 
> they're displayed when your web site renders XML content?  If so, then 
> Christoph's advice applies: you need to write a bit of Java to format 
> the date according to your heart's desire.
> 
> Jon
> 
> -----Original Message-----
> From: sfdbfoui at host2.scintillance.com
> [mailto:sfdbfoui at host2.scintillance.com] On Behalf Of Samir Djulancic
> Sent: 25 January 2007 11:20
> To: The OpenCms mailing list
> Subject: RE: [opencms-dev] How to change the date format?
> 
> 
> "The date format used when displaying content is by default depending 
> on the locale of the resource (possibly inherited)."
> 
> Is it possible to change this? To tell like "I don't care where you 
> are but this is the date format you have to use" ?
> 
> (the format used in the workplace isn't important..)
> 
> 
> 
> -------- Original-Nachricht --------
> Datum: Thu, 25 Jan 2007 11:43:07 +0100
> Von: "Carl Alex Friis Nielsen" <cfn at kb.dk>
> An: "The OpenCms mailing list" <opencms-dev at opencms.org>
> Betreff: RE: [opencms-dev] How to change the date format?
> 
> > The date format used in the workplace changes according to the 
> > locale you set the workplace to use in the preferences dialog.
> > 
> > The date format used when displaying content is by default depending 
> > on the locale of the resource (possibly inherited).
> > 
> > -----Original Message-----
> > From: opencms-dev-bounces at opencms.org@KB On Behalf Of "Samir Djulancic"
> > <Sam2266 at gmx.de>
> > Sent: Thursday, January 25, 2007 10:36 AM
> > To: The OpenCms mailing list
> > Subject: Re: [opencms-dev] How to change the date format?
> > 
> > 
> > Hey Christoph,
> > 
> > thanks for the fast reply.
> > 
> > I tried to change the browser properties. But nothing happened. 
> > 
> > I wanted to set a dateStyle but I actually have no idea in which 
> > file of OpenCms to do this.. There must be a dateStyle somewhere 
> > (OpenCms is using
> > it) but where..?
> > 
> > I just saw that the format per default is MM.dd.YY This is very 
> > confusing for the users..
> > 
> > So if you - or someone else - have/has an idea... Thanks again
> > 
> > 
> > -------- Original-Nachricht --------
> > Datum: Thu, 25 Jan 2007 10:23:16 +0100
> > Von: "Christoph Schönfeld" <cschoenfeld at sylphen.com>
> > An: The OpenCms mailing list <opencms-dev at opencms.org>
> > Betreff: Re: [opencms-dev] How to change the date format?
> > 
> > > You could try to change the preferred locale within your browser 
> > > and see if that has an effect. As far as I know OpenCms determines 
> > > the locale dynamically depending on the accept-language header 
> > > sent by
> browsers.
> > > See the HTTP RFC, section 14.4
> > > (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4) 
> > > for information on this header.
> > > 
> > > In the Firefox preferences, the setting can be found under "Languages"
> > > in the "Advanced" tab.
> > > 
> > > You might also try to set a dateStyle of "dd.MM.yyyy" or any date 
> > > pattern you like. See the Java API for 
> > > java.text.DateFormat/SimpleDateFormat for more information on the
> > format.
> > > 
> > > These suggestions are just guesses, I did not try them.
> > > 
> > > Best regards,
> > > Christoph
> > > 
> > > 
> > > _______________________________________________
> > > This mail is sent to you from the opencms-dev mailing list To 
> > > change your list options, or to unsubscribe from the list, please
> > visit
> > > http://lists.opencms.org/mailman/listinfo/opencms-dev
> > 
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > 
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list To change 
> > your list options, or to unsubscribe from the list, please visit 
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> > 
> > 
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list To change 
> > your list options, or to unsubscribe from the list, please visit 
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> --
> "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
> Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change 
> your list options, or to unsubscribe from the list, please visit 
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change 
> your list options, or to unsubscribe from the list, please visit 
> http://lists.opencms.org/mailman/listinfo/opencms-dev

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list