lektor-datetime-helpers

Lektor plugin to help with dates and times


Keywords
lektor, date, datetime
License
BSD-3-Clause
Install
pip install lektor-datetime-helpers==1.0.1

Documentation

Helpers for Dealing with datetimes in Lektor

PyPI version PyPI Supported Python Versions GitHub license GitHub Actions (Tests)

Introduction

This is a plugin for Lektor which provides some helpers for dealing with dates and times.

Currently this provides a dateordatetime model field type which can contain either a date or a datetime.

Also the following jinja filters are provided:

isoformat(dt)
Returns an iso formatted version the datetime, with timezone information. If dt is naive, it is localized to the site's default timezone.
localize_datetime(dt)
If dt is naive, it is localized to the site's default timezone.