.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, datetime.datetime time) | |
__str__ (self) | |
str | l10n (self, DateTimeFormats|str fmt="medium", babel.Locale|GeoLocation|None locale=None) |
Public Attributes | |
datetime = time | |
Class to represent date & time. Essentially, it is a wrapper that conveniently combines :py:obj:`datetime.datetime` and :py:obj:`babel.dates.format_datetime`. A conversion of time zones is not provided (in the current version).
Definition at line 198 of file weather.py.
searx.weather.DateTime.__init__ | ( | self, | |
datetime.datetime | time ) |
Definition at line 205 of file weather.py.
searx.weather.DateTime.__str__ | ( | self | ) |
Definition at line 208 of file weather.py.
References l10n().
str searx.weather.DateTime.l10n | ( | self, | |
DateTimeFormats | str | fmt = "medium", | ||
babel.Locale | GeoLocation | None | locale = None ) |
Localized representation of date & time.
Definition at line 211 of file weather.py.
References searx.weather._get_sxng_locale_tag(), searx.result_types.answer.WeatherAnswer.Item.datetime, and datetime.
Referenced by searx.weather.Compass.__str__(), __str__(), searx.weather.Pressure.__str__(), searx.weather.RelativeHumidity.__str__(), searx.weather.Temperature.__str__(), and searx.weather.WindSpeed.__str__().
searx.weather.DateTime.datetime = time |
Definition at line 206 of file weather.py.
Referenced by l10n().