Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.0
Filename, size File type Python version Upload date Hashes
Filename, size Japanera-0.1.0.tar.gz (18.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page