Class Savant3_Plugin_date

Description

Plugin to generate a formatted date using strftime() conventions.

Located in /Savant3/resources/Savant3_Plugin_date.php (line 27)

Savant3_Plugin
   |
   --Savant3_Plugin_date
Variable Summary
array $custom
array $default
Method Summary
string date (string $datestring, [string $format = null])
Variables
array $custom = array(
'date' => '%Y-%m-%d',
'time' => '%H:%M:%S'
)
(line 71)

Custom strftime() format strings to use for dates.

You can preset the format strings via Savant3::setPluginConf().

  1.  $conf array(
  2.      'custom' => array(
  3.          'mydate' => '%Y-%m-%d',
  4.          'mytime' => '%R'
  5.      )
  6.  );
  7.  
  8.  $Savant->setPluginConf('date'$conf);

... and in your template, to use a preset custom string by name:

  1.  echo $this->date($value'mydate');

  • access: public
array $default = '%c' (line 39)

The default strftime() format string.

  • access: public

Inherited Variables

Inherited from Savant3_Plugin

Savant3_Plugin::$Savant
Methods
date (line 93)

Outputs a formatted date using strftime() conventions.

  • return: The formatted date string.
  • access: public
string date (string $datestring, [string $format = null])
  • string $datestring: Any date-time string suitable for strtotime().
  • string $format: The strftime() formatting string, or a named custom string key from $this->custom.

Inherited Methods

Inherited From Savant3_Plugin

Savant3_Plugin::__construct()

Documentation generated on Tue, 31 Mar 2009 16:24:42 -0500 by phpDocumentor 1.4.2