Replacement for the "date" Django template tag to show Thai years
Project description
django-thaidate
===============
A drop-in replacement for the "[date](https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#date)" django templatetag. The only difference is that it shows Thai years, not Gregorian calendar ones.
The `TIME_ZONE` needs to be set to `'Asia/Bangkok'` in your `settings.py`
```
{{ value|date:"D d M Y" }} # อา. 10 ก.พ. 2019
{{ value|thaidate:"D d M Y" }} # อา. 10 ก.พ. 2562
```
===============
A drop-in replacement for the "[date](https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#date)" django templatetag. The only difference is that it shows Thai years, not Gregorian calendar ones.
The `TIME_ZONE` needs to be set to `'Asia/Bangkok'` in your `settings.py`
```
{{ value|date:"D d M Y" }} # อา. 10 ก.พ. 2019
{{ value|thaidate:"D d M Y" }} # อา. 10 ก.พ. 2562
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-thaidate-1.0.1.tar.gz
(2.8 kB
view hashes)