The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Bot::IRC::X::Time - Bot::IRC plugin for some time functions

VERSION

version 1.01

SYNOPSIS

    use Bot::IRC;

    Bot::IRC->new(
        connect => { server => 'irc.perl.org' },
        plugins => ['Time'],
    )->run;

DESCRIPTION

This Bot::IRC plugin provides some time functions. The following are the details:

date [<time>]

Returns the current date and time. If an optional timestamp is provided, it'll return the formatted data and time for that timestamp.

time

Returns the current timestamp.

zulu

Exactly like date except will return Zulu time.

str2time <string>

Accepts most reasonable date and time strings and returns timestamps for those values.

str2date <string>

Accepts most reasonable date and time strings and returns a formatted date and time string.

when was <time>|<string>

Accepts a timestamp or a date and time string and returns a duration string like: "1 year, 2 months, and 4 hours"

ago <duration string>

Accepts a duration string like what would be returned from "when was" and returns a formatted date and time string.

SEE ALSO

You can look for additional information at:

AUTHOR

Gryphon Shafer <gryphon@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Gryphon Shafer.

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