[Zope-CMF] formatting dtml-Date

Tres Seaver tseaver@palladion.com
Wed, 13 Jun 2001 22:57:57 -0400


Jens Quade wrote:

> Ben Riga <briga@borland.com> writes:
> 
> 
>>reformatted but are probably not the dates I want.  I think that I need the
>>"Date" date in an object that I can manipulate using something like:
>><dtml-var created fmt="%a %b %d">
>>
> 
> The default DublinCore Implementation returns strings in ISO 8601? 
> format. A very useful string representation of a date, but to 
> reformat it you have to construct a DateTime object from it:
> 
> e.g. <dtml-var "_.DateTime(CreationDate)" fmt="...">


  - The stock DublinCore methods (Date, CreationDate, EffectiveDate,
    ExpirationDate, ModificationDate) return strings;

  - the "searchable" DC methods return DateTime objects (created,
    effective, expires, modified)

You will need to use the "searchable" ones if you want to reformat.

BTW, the plain "Date" is only there for compatibility with the
*quite lame* DublinCore element;  its semantics are so weak as to
make it fundamentally useless for our purposes.

Tres.