2020-02-04 21:10:05 +01:00
|
|
|
# pylint: disable=C0111,R0903
|
|
|
|
|
2020-04-02 16:30:31 +02:00
|
|
|
"""Displays the current date and time.
|
2020-02-04 21:10:05 +01:00
|
|
|
|
|
|
|
Parameters:
|
|
|
|
* time.format: strftime()-compatible formatting string
|
|
|
|
* time.locale: locale to use rather than the system default
|
2020-04-02 16:30:31 +02:00
|
|
|
"""
|
2020-02-04 21:10:05 +01:00
|
|
|
|
2020-04-02 16:30:31 +02:00
|
|
|
import core.decorators
|
2020-02-04 21:10:05 +01:00
|
|
|
from .datetime import Module
|
|
|
|
|
2020-05-03 11:15:52 +02:00
|
|
|
|
2020-02-04 21:10:05 +01:00
|
|
|
class Module(Module):
|
2020-05-03 11:15:52 +02:00
|
|
|
@core.decorators.every(seconds=59) # ensures one update per minute
|
2020-04-26 16:39:24 +02:00
|
|
|
def __init__(self, config, theme):
|
|
|
|
super().__init__(config, theme)
|
2020-02-04 21:10:05 +01:00
|
|
|
|
|
|
|
def default_format(self):
|
2020-05-03 11:15:52 +02:00
|
|
|
return "%X"
|
|
|
|
|
2020-02-04 21:10:05 +01:00
|
|
|
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|