|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
codepony Smarty n00b
Joined: 17 Sep 2012 Posts: 2
|
Posted: Mon Sep 17, 2012 9:53 am Post subject: date_format missing parameter |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Mon Sep 17, 2012 11:52 am Post subject: |
|
|
urm… what? _________________ Twitter |
|
Back to top |
|
codepony Smarty n00b
Joined: 17 Sep 2012 Posts: 2
|
Posted: Mon Sep 17, 2012 12:33 pm Post subject: |
|
|
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.
An answer of 16 was treated as invalid. |
|
Back to top |
|
|
|
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
|