Django model for Japanese birthday.
Project description
django-jp-birthday
django-jp-birthday is a django's model for use Japanese birthdays and ages.
Based library is https://github.com/bashu/django-birthday .
Authored by shimakaze_soft and some great
Features
- Get all user profiles within the next 30 days
- Get all user profiles which have their birthday today
- order the user profiles according to their birthday
- Converting Birthdays to Japanese Style
- Calculate age based on birthday
- Get all birthdays in the specified Japanese calendar
Installation
$ pip install django-jp-birthday
$ python steup.py install
Usage
django-jp-birthday provides a jp_birthday.models.BirthdayModel
model type which is a subclass of django.db.models.Model and thus has the same characteristics as that.
jp_birthday.managers.JpBirthdayManager
is used as a manager for jp_birthday.models.BirthdayModel
and provides various methods.
from jp_birthday.models import BirthdayModel
class ModelsTest(BirthdayModel):
class Meta:
app_label = 'jp_birthday'
ordering = ('pk',)
Get all user profiles within the next 30 days
# ["2001-01-01", "2000-01-02", "2002-12-31"]
jan1 = date(year=2010, month=1, day=1)
birthdays = ModelsTest.objects.get_upcoming_birthdays(after=jan1)
# ["2001-01-01", "2000-01-02"]
Get all user profiles which have their birthday today
# ["2001-01-01", "2000-01-02", "2002-12-31", "1990-03-01"]
jan1 = date(year=2010, month=1, day=1)
birthdays = ModelsTest.objects.get_birthdays(jan1)
# ["2001-01-01", "1990-01-01"]
Order the user profiles according to their birthday
# ["2001-01-01", "2000-01-02", "2002-12-31", "1990-03-01"]
jan1 = date(year=2010, month=1, day=1)
birthdays = ModelsTest.objects.order_by_birthday()
# ["2001-01-01", "2000-01-02", "1990-03-01", "2002-12-31"]
Docs
- Documentation: https://django-jp-birthday.readthedocs.io.
License
django-jp-birthday
is released under the MIT license.
HISTORY
Unreleased
Merged pull requests:
- 干支を表示する機能を作成. #45 (shimakaze-git)
v0.4.0 (2022-02-08)
v0.3.0 (2022-02-07)
v0.2.0 (2022-02-07)
Closed issues:
- Initial Update #30
Merged pull requests:
- v0.2.0 #40 (github-actions[bot])
- Versionを0.2にアップロード. #39 (shimakaze-git)
- v0.1.5 #37 (github-actions[bot])
- fix: git pushの処理を追加. #36 (shimakaze-git)
v0.1.5 (2022-01-29)
Merged pull requests:
- v0.1.5 #35 (github-actions[bot])
- develop to master. #34 (shimakaze-git)
v0.1.4 (2022-01-29)
Merged pull requests:
- v0.1.4 #33 (github-actions[bot])
- 0.1.4にバージョンアップ. #32 (shimakaze-git)
- Config file for pyup.io #31 (pyup-bot)
- v0.1.3 #29 (github-actions[bot])
- fix: templateを修正していく. #28 (shimakaze-git)
- [v0.1.3] (2022-01-29) #27 (github-actions[bot])
- fix: add HISTORY.rstを削除していく. #26 (shimakaze-git)
- [v0.1.3] (2022-01-29) #25 (github-actions[bot])
- develop to master #24 (shimakaze-git)
v0.1.3 (2022-01-28)
Merged pull requests:
- v0.1.3 #23 (github-actions[bot])
- develop to master. #22 (shimakaze-git)
- v0.1.3 #21 (github-actions[bot])
- 0.1.3に変更 #20 (shimakaze-git)
- Develop to Master. #18 (shimakaze-git)
- refactor: プルリク先をreleaseに変更. #16 (shimakaze-git)
- Develop to Master #15 (shimakaze-git)
- Develop #14 (shimakaze-git)
- fix: ワークフローの環境変数を色々表示させる. #12 (shimakaze-git)
- fix: master-prを修正する. #11 (shimakaze-git)
- fix: ci周りとreleaseのブランチを変更. #10 (shimakaze-git)
- feat: ciを追加して整備する. #9 (shimakaze-git)
- release 0.1 #8 (shimakaze-git)
- 一度templateを取り込む. #2 (shimakaze-git)
HISTORY
Unreleased
Merged pull requests:
- v0.1.5 #37 (github-actions[bot])
- fix: git pushの処理を追加. #36 (shimakaze-git)
v0.2.0 (2022-02-07)
Closed issues:
- Initial Update #30
v0.1.5 (2022-01-29)
Merged pull requests:
- v0.1.5 #35 (github-actions[bot])
- develop to master. #34 (shimakaze-git)
v0.1.4 (2022-01-29)
Merged pull requests:
- v0.1.4 #33 (github-actions[bot])
- 0.1.4にバージョンアップ. #32 (shimakaze-git)
- Config file for pyup.io #31 (pyup-bot)
- v0.1.3 #29 (github-actions[bot])
- fix: templateを修正していく. #28 (shimakaze-git)
- [v0.1.3] (2022-01-29) #27 (github-actions[bot])
- fix: add HISTORY.rstを削除していく. #26 (shimakaze-git)
- [v0.1.3] (2022-01-29) #25 (github-actions[bot])
- develop to master #24 (shimakaze-git)
v0.1.3 (2022-01-28)
Merged pull requests:
- v0.1.3 #23 (github-actions[bot])
- develop to master. #22 (shimakaze-git)
- v0.1.3 #21 (github-actions[bot])
- 0.1.3に変更 #20 (shimakaze-git)
- Develop to Master. #18 (shimakaze-git)
- refactor: プルリク先をreleaseに変更. #16 (shimakaze-git)
- Develop to Master #15 (shimakaze-git)
- Develop #14 (shimakaze-git)
- fix: ワークフローの環境変数を色々表示させる. #12 (shimakaze-git)
- fix: master-prを修正する. #11 (shimakaze-git)
- fix: ci周りとreleaseのブランチを変更. #10 (shimakaze-git)
- feat: ciを追加して整備する. #9 (shimakaze-git)
- release 0.1 #8 (shimakaze-git)
- 一度templateを取り込む. #2 (shimakaze-git)
* This Changelog was automatically generated bygithub_changelog_generator
* This Changelog was automatically generated by github_changelog_generator
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
Built Distribution
Hashes for django_jp_birthday-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5feb7bbb917161ba070e024b54fc7fd3f25627566bb5a693b64e6332b5d7d203 |
|
MD5 | 17b632890801fd6e9135e89e28150701 |
|
BLAKE2b-256 | c7db9acb7ee180c3edb76dfeeb4a0a6dfd795b7b9710bbff8d97f18dd99165ea |