- Python 2.7+
- Python 3.2+
Install erajp via PyPI:
pip install erajp
>>> strjpftime()
'H27.08.05' # now
>>> strjpftime(datetime.datetime(1989, 1, 8))
'H1.01.08'
>>> strjpftime(datetime.datetime(1989, 1, 8), u"%O%E年")
'平成元年'
- %o : alpabet era
- %O : Chinese charactor era
- %E : era year
https://github.com/recruit-mtl/erajp
MIT License