[Typo3] Date formats

Christopher bedlamhotel at gmail.com
Sat Aug 27 00:09:27 CEST 2005


Hi,

On 26/08/05, Jody Cleveland <Cleveland at winnefox.org> wrote:
> Hi Daniel,
> 
> Thanks for taking the time to help me.
> 
> > Everywhere? Where?
> 
> Searched the main page, the list archives, google. Searched for 'date
> format' and several variations of that. I also thought I had seen it
> somewhere in the TSRef document. I couldn't find it. I spent over two
> hours looking for it, so I was hoping someone on the list happened to
> know where it was.
> 
> > Some days ago I answered a similar question in this mailinglist.
> > Search for postings with my name in the past 2 weeks and you
> > will find an answer.
> 
> I read every message you resonded to for the past month and a half and
> didn't see anything relating to date format. Do yo
u remember what the
> subject of the message was?
> 

These date formats have nothing in particular to do with Typo3.
However, you can figure out where they come from if you look at how
they're used wherever you're using them. You'll notice that they
frequently appear in this sort of context:

5 = HTML
5.value.field = start_time
5.value.date = Y m d

This format should send you *immediately* to the 'stdWrap' section of
the TSref [1]. There, you will find this if you search for "date":

"The content should be data-type "UNIX-time". Returns the content
formatted as a date."

...which is not so helpful in itself, _but_ you should notice that its
'Data type' is 'date-conf'. Having discovered this, you should then
cross-reference the stdWrap item you're looking at with the "Datatype
reference" in the TSref [2]. There, you will find the following
explanation:

"See PHP function Date()!" [3]

On the other hand, you might have had a TS object like this returning a date:

6 = HTML
6.value.field = start_time
6.value.strftime = %D

Again, this is plainly a case of stdWrap. Looking on [1] for
'strftime' yields the following result:

'Exactly like "date" above. See the PHP-manual (strftime) for the
codes, or datatype "strftime-conf".'

...which explicitly refers you to [2] again and to the php function manual [4].

Even if the TS objects you're working with are not like the examples
shown, it's worth a look in the stdWrap section of the TSref - almost
any time that TS _changes_ or _manipulates_ any input, it's some
stdWrap property  doing it.

You may also want to spend some time looking at the advanced features
of Google; this search:

site:typo3.org + date + format + tsref

[http://www.google.ca/search?q=site%3Atypo3.org+%2B+date+%2B+format+%2B+tsref]

...yields [2] and [1] as results 2 and 3 respectively.


-Christopher


[1] http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/
[2] http://typo3.org/documentation/document-library/doc_core_tsref/Datatype_reference/
[3] http://php.net/manual/en/function.date.php
[4] http://php.net/manual/en/function.strftime.php



More information about the TYPO3-english mailing list