Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.08 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.08 KB

pypi pypi GitHub license travis coveralls

erajp: Convert datetime to Japanese era

Requirements

  • Python 2.7+
  • Python 3.2+

Installation

Install erajp via PyPI:

pip install erajp

How to use

>>> strjpftime()
 'H27.08.05' # now
>>> strjpftime(datetime.datetime(1989, 1, 8)) 
 'H1.01.08'
>>> strjpftime(datetime.datetime(1989, 1, 8), u"%O%E年")
 '平成元年'

New available date format

  • %o : alpabet era
  • %O : Chinese charactor era
  • %E : era year

Main Project Website.

https://github.com/recruit-mtl/erajp

License

MIT License