API16

JDate/ toString: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 30: Line 30:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=__toString
  category=__toString
  category=JDate
  category=JDate
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:30, 25 March 2017

Description

Magic method to render the date object in the format specified in the public static member JDate::$format.


<! removed transcluded page call, red link never existed >

Syntax

__toString()


Returns

string The date as a formatted string.

Defined in

libraries/joomla/utilities/date.php

Importing

jimport( 'joomla.utilities.date' );

Source Body

public function __toString()
{
        return (string) parent::format(self::$format);
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples