NAME

Bot::BasicBot::Pluggable::Module::DateTimeCalc - Calculate date-time operations

VERSION

version 0.0202

SYNOPSIS

use Bot::BasicBot::Pluggable::Module::DateTimeCalc;
my $bot = Bot::BasicBot::Pluggable::Module::DateTimeCalc->new( nick => 'TimeBot', '...' );
$bot->run();

DESCRIPTION

A Bot::BasicBot::Pluggable::Module::DateTimeCalc calculates date-time operations.

This bot is coded to only respond when directly addressed, btw.

Since this module uses Date::Manip, many different date-time formats are supported.

METHODS

help()

Show the keyword help text.

said()

Process the date-time calculations.

IRC COMMANDS

source

> TimeBot: source

Return the github repository where this is hosted.

now

> TimeBot: now

Return the current date and time.

localtime

> TimeBot: localtime 123456

Return the date-time string given an epoch time.

dow

> TimeBot: dow 2018-06-24

Return the day of the week for the given date-time stamp.

diff

> TimeBot: diff '2018-06-24 17:51:17' '1/2/2032'

Return a duration string in days, hours, minutes and seconds from two date-time stamps.

{add,sub}_{years,months,days,hours,minutes,seconds}

> TimeBot: add_days '1/2/2032'

Add or subtract the the given span from the given date-time stamp.

SEE ALSO

Bot::BasicBot::Pluggable

Date::Manip

DateTime

DateTime::Format::DateParse

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Gene Boggs.

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