Skip to main content

Easy japanese era tool

Project description

Easy japanese era tool

Powered by Yamato Nagata

GitHub ReadTheDocs

>>> from datetime import date
>>> from japanera import Japanera, EraDate

>>> janera = Japanera()

>>> c_era = janera.era(date.today())
>>> c_era._in(date(2019, 4, 16))
True

>>> "Current Japanese Era is <{}>: <{}>".format(c_era.kanji, c_era.english)
Current Japanese Era is <平成>: <Heisei>

>>> "Current Date is <{}>".format(c_era.strftime(date(2019, 4, 16), "%-E%-O年%m月%d日"))
Current Date is <平成31年04月16日>

>>> # Or you can do same thing in this way
>>> "Current Date is <{}>".format(EraDate(2019, 4, 16).strftime("%-E%-O年%m月%d日"))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Japanera, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size Japanera-0.1.1.tar.gz (19.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page