AnewtDateTimeAtom class

This class is used to represent a date.

Class Overview

This class is used to represent a date.

Don't use this class directly, it's mainly for internal usage. Use AnewtDateTime's parse functions to create AnewtDateTimeAtom objects.

Public Methods

__construct($year, $month=1, $day=1, $hour=0, $minute=0, $second=0)

Constructs a new AnewtDateTimeAtom object.

Parameters

$year

Year.

$month

Month (optional, defaults to 1).

$day

Day (optional, defaults to 1).

$hour

Hours (optional, defaults to 0).

$minute

Minutes (optional, defaults to 0).

$second

Seconds (optional, defaults to 0).

timestamp()

Returns a timestamp for this AnewtDateTimeAtom object.

Timestamps are very useful when formatting dates using strftime() or date().

Return value

An integer representing this AnewtDateTimeAtom instance.

render()

Renders this object to a string.

This method makes AnewtDateTimeAtom conform to the "renderable" interface.

Return value

A formatted string.

Public Attributes

$year

Year.

$month

Month.

$day

Day.

$hour

Hours.

$minute

Minutes.

$second

Seconds.