Limnoria-doc/use/plugins/time.rst

72 lines
1.7 KiB
ReStructuredText
Raw Normal View History

2011-06-28 08:11:32 +02:00
.. _plugin-time:
The Time plugin
===============
2011-06-28 17:29:38 +02:00
Relative time
-------------
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-time-ctime:
time ctime [<seconds since epoch>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
Returns the ctime for *<seconds since epoch>*, or the current ctime if
no *<seconds since epoch>* is given.
2011-06-28 17:29:38 +02:00
.. _command-time-time:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
time time [<format>] [<seconds since epoch>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
Returns the current time in *<format>* format, or, if *<format>* is not
given, uses the configurable format for the current channel. If no
*<seconds since epoch>* time is given, the current time is used.
2011-06-28 17:29:38 +02:00
.. _command-time-elapsed:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
time elapsed <seconds>
^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
Returns a pretty string that is the amount of time represented by
*<seconds>*.
2011-06-28 17:29:38 +02:00
time until <time string>
^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Returns the number of seconds until *<time string>*.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Absolute time
-------------
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-time-seconds:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
time seconds [<years>y] [<weeks>w] [<days>d] [<hours>h] [<minutes>m] [<seconds>s]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Returns the number of seconds in the number of *<years>*, *<weeks>*,
*<days>*, *<hours>*, *<minutes>*, and *<seconds>* given. An example usage is
"seconds 2h 30m", which would return 9000, which is '3600*2 + 30*60'.
Useful for scheduling events at a given number of seconds in the
future.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-time-at:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
time at <time string>
^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Returns the number of seconds since epoch *<time string>* is.
*<time string>* can be any number of natural formats; just try something
and see if it will work.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-time-tztime:
time tztime <region>/<city>
^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Takes a city and its region, and returns the locale time.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-time-until: