[Zope-CMF] formatting dtml-Date

Ben Riga briga@borland.com
Thu, 14 Jun 2001 09:10:07 -0700


I agree.  I have the exact same problem in that I sometimes insert content
that I want to have an earlier effective date but not always.  Date seems to
have the right date (or at least the one I want) at all times.

Ben

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf Of
Bjorn Stabell
Sent: Wednesday, June 13, 2001 8:58 PM
To: zope-cmf@zope.org
Subject: RE: [Zope-CMF] formatting dtml-Date


I find Date() quite useful, so useful that I use it all the time and
send it through ZopeTime (_.DateTime).  If the publisher specified
effective date, it'll show that, otherwise it'll show the modified date.
Very handy; I always use it to show the date of content.  I also wish
there was a DateTime version of it; how about just using date() for it?

The semantics fit quite nicely in that publishers sometimes want to
control the 'publishing date', but sometimes they don't care and don't
specify one.  If it wasn't for Date(), I would have to check manually if
effective date was set; if not, I would use bobobase_modification_time.

-----Original Message-----
From: Tres Seaver [mailto:tseaver@palladion.com]
Posted At: Thursday, June 14, 2001 10:58
Posted To: Zope CMF
Conversation: [Zope-CMF] formatting dtml-Date
Subject: Re: [Zope-CMF] formatting dtml-Date


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.


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests