Jump to content

User:AnomieBOT/source/d/Timestamp.pm/doc

From Wikipedia, the free encyclopedia

NAME

[edit]

d::Timestamp - AnomieBOT timestamp handling decorator

SYNOPSIS

[edit]
 use AnomieBOT::API;
 
 $api = new AnomieBOT::API('conf.ini', 1);
 $api->decorators(qw/d::Timestamp/);

DESCRIPTION

[edit]

d::Timestamp contains timestamp-related utility functions for use by an AnomieBOT task. When "d::Timestamp" is used as a decorator on the API object, the following methods are available.

METHODS PROVIDED

[edit]
$api->ISO2timestamp( $ts )
Convert an ISO-format timestamp into a standard epoch value.
$api->timestamp2ISO( $ts )
Convert an epoch value to an ISO-format timestamp.
[edit]

Copyright 2008–2013 Anomie

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.