# classes/phing/tasks/system/TstampTask.php

Sets properties to the current time, or offsets from the current time.

The default properties are TSTAMP, DSTAMP and TODAY;

Based on Ant's Tstamp task.

author
  Michiel Rook
package
  phing.tasks.system
since
  2.2.0
version
  $Revision: 557 $

## \TstampCustomFormat
jump to top

package
  phing.tasks.system

### Properties

`$locale= ''`
Details

Type

`$pattern= ''`
Details

Type

`$propertyName= ''`
Details

Type

### Methods

`execute( \TstampTask $tstamp ) :`
validate parameter and execute the format.
Parameters

Name | Type | Description
--- | --- | ---
$tstamp | \TstampTask | reference to task

`setLocale( $locale ) :`
The locale used to create date/time string.
Parameters

Name | Type | Description
--- | --- | ---
$locale |  | locale

`setPattern( $pattern ) :`
The date/time pattern to be used. The values are as defined by the PHP strftime() function.
Parameters

Name | Type | Description
--- | --- | ---
$pattern |  | pattern

`setProperty( \propertyName $propertyName ) :`
The property to receive the date/time string in the given pattern
Parameters

Name | Type | Description
--- | --- | ---
$propertyName | \propertyName | the name of the property.

## \TstampTask
jump to top

Sets properties to the current time, or offsets from the current time.

The default properties are TSTAMP, DSTAMP and TODAY;

Based on Ant's Tstamp task.

Extends from
  \Task
author
  Michiel Rook
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
since
  2.2.0
version
  $Revision: 557 $

### Properties

`$customFormats= 'array'`
Default value `array` Details

Type

`$prefix= ''`
Details

Type

### Methods

`addFormat( \TstampCustomFormat $cf ) :`
Adds a custom format
Parameters

Name | Type | Description
--- | --- | ---
$cf | \TstampCustomFormat | custom format

`main( ) :`
Create the timestamps. Custom ones are done before the standard ones.
Details

throws

`prefixProperty( $name, $value ) :`
helper that encapsulates prefix logic and property setting policy (i.e. we use setNewProperty instead of setProperty).
Parameters

Name | Type | Description
--- | --- | ---
$name |  |
$value |  |

`setPrefix( \prefix $prefix ) :`
Set a prefix for the properties. If the prefix does not end with a "." one is automatically added.
Parameters

Name | Type | Description
--- | --- | ---
$prefix | \prefix | the prefix to use.

Documentation was generated by DocBlox 0.13.1.