Docs For Class EasyRdf_Literal_Date

## Class EasyRdf_Literal_Date

Description

Class that represents an RDF Literal of datatype xsd:date

- copyright: Copyright (c) 2009-2011 Nicholas J Humfrey
- link: http://www.w3.org/TR/xmlschema-2/#date
- license: http://www.opensource.org/licenses/bsd-license.php

Located in /EasyRdf/Literal/Date.php (line 47)

    EasyRdf_Literal
       |
       --EasyRdf_Literal_Date

Direct descendents

Class | Description
--- | ---
EasyRdf_Literal_DateTime | Class that represents an RDF Literal of datatype xsd:dateTime

Method Summary
object EasyRdf_Literal_Date __construct (mixed $value, [string $lang = null], [string $datatype = null])
integer day ()
string format (string $format)
integer month ()
integer year ()
string __toString ()
Methods
Constructor __construct (line 59)

Constructor for creating a new date literal

The date is parsed and stored internally using a DateTime object.

- see: DateTime
- access: public

object EasyRdf_Literal_Date __construct (mixed $value, [string $lang = null], [string $datatype = null])

- mixed $value: The value of the literal
- string $lang: Should be null (literals with a datatype can't have a language)
- string $datatype: Optional datatype (default 'xsd:date')

Redefinition of:

EasyRdf_Literal::__construct()
  Constructor for creating a new literal

Redefined in descendants as:

- EasyRdf_Literal_DateTime::__construct() : Constructor for creating a new date literal

day (line 101)

Integer representation of the day of the month

- access: public

integer day ()
format (line 74)

Returns date formatted according to given format

- access: public

string format (string $format)

- string $format

month (line 92)

Integer representation of the month

- access: public

integer month ()
year (line 83)

A full integer representation of the year, 4 digits

- access: public

integer year ()
__toString (line 110)

Magic method to return the value as an ISO8601 date string

- return: The date as an ISO8601 string
- access: public

string __toString ()

Redefinition of:

EasyRdf_Literal::__toString()
  Magic method to return the value of a literal when casted to string

Redefined in descendants as:

- EasyRdf_Literal_DateTime::__toString() : Magic method to return the value as an ISO8601 string

#### Inherited Methods

Inherited From EasyRdf_Literal

> EasyRdf_Literal::__construct()
> EasyRdf_Literal::create()
> EasyRdf_Literal::deleteDatatypeMapping()
> EasyRdf_Literal::dumpValue()
> EasyRdf_Literal::getDatatype()
> EasyRdf_Literal::getDatatypeForValue()
> EasyRdf_Literal::getDatatypeUri()
> EasyRdf_Literal::getLang()
> EasyRdf_Literal::getValue()
> EasyRdf_Literal::setDatatypeMapping()
> EasyRdf_Literal::toArray()
> EasyRdf_Literal::__toString()

Documentation generated on Wed, 20 Jul 2011 19:54:03 +0100 by phpDocumentor 1.4.3