Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

date_format missing parameter

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Documentation
View previous topic :: View next topic  
Author Message
codepony
Smarty n00b


Joined: 17 Sep 2012
Posts: 2

PostPosted: Mon Sep 17, 2012 9:53 am    Post subject: date_format missing parameter Reply with quote

One of the parameters are left out of the list, a "formatter" one. By default it is auto which gives access to the date() function rather then the more limited strftime().

http://php.net/manual/en/function.date.php

Also, apparently 9 + 7 is not 16... who knew?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Mon Sep 17, 2012 11:52 am    Post subject: Reply with quote

urm… what?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
codepony
Smarty n00b


Joined: 17 Sep 2012
Posts: 2

PostPosted: Mon Sep 17, 2012 12:33 pm    Post subject: Reply with quote

It's from your source code.

Code:
/**
 * Smarty date_format modifier plugin
 *
 * Type:     modifier<br>
 * Name:     date_format<br>
 * Purpose:  format datestamps via strftime<br>
 * Input:<br>
 *          - string: input date string
 *          - format: strftime format for output
 *          - default_date: default date if $string is empty
 *
 * @link http://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)
 * @author Monte Ohrt <monte at ohrt dot com>
 * @param string $string       input date string
 * @param string $format       strftime format for output
 * @param string $default_date default date if $string is empty
 * @param string $formatter    either 'strftime' or 'auto'
 * @return string |void
 * @uses smarty_make_timestamp()
 */


From your manual.

Code:
Parameter Position   Type   Required   Default   Description
1   string   No   %b %e, %Y   This is the format for the outputted date.
2   string   No   n/a   This is the default date if the input is empty.


Quote:
date_format is essentially a wrapper to PHP's strftime() function.


From your "Post a comment" form on the Documentation pages.
Quote:
What is 9 plus 7?


An answer of 16 was treated as invalid.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Documentation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP