datetime( format, timezone )

Description:

Convert an arbitrary date string into a formatted date.

Input:

An absolute or relative date string in arbitrary format (ex: 'June 1, 2011', 'last sunday') or an integer Unix epoch timestamp.

Parameters:

format

A format string to conform the output to. Uses the PHP date() function's format.

timezone

Optional identifier of a time zone to shift the passed date into before formatting. Defaults to the site's configured time zone.

Return:

The input date, formatted according to the passed date string.