Git Product home page Git Product logo

jp_arrow's Introduction

jp_arrow.

Conver date/datetime from/to Japanese date/datetime.

This module highly depend on "arrow".

  • ISO date/datetime from/to Japanse date/datetime.
  • 100% compatible for "arrow" except japanses date.
  • builtins format for japanese date.

Install

pip install jp_arrow

How to use

In [1]: import jp_arrow

In [2]: jp_arrow.utcnow().format('EEYYYYMMDD', locale='ja')
Out[2]: '令和04年0715日'

In [3]:
In [2]: dt = jp_arrow.get('平成36年01月13日')

In [3]: dt
Out[3]: <Arrow [2024-01-13T00:00:00+00:00]>

In [4]: dt.format(jp_arrow.FORMAT_WAREKI)
Out[4]: '令和6年1月13日'

In [5]: dt.format(jp_arrow.FORMAT_WAREKI_W)
Out[5]: '令和06年01月13日'

In [6]: dt.format(jp_arrow.FORMAT_JISX0301)
Out[6]: 'R6.1.13'

In [7]: dt.format(jp_arrow.FORMAT_JISX0301_W)
Out[7]: 'R06.01.13'

In [8]:

jp_arrow's People

Watchers

Goichi (Iisaka) Yukawa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.