Git Product home page Git Product logo

nine-limit's Introduction

Nine Limit

build 九極

原理

根據西元 年月日時分 換算成農(陰)曆 年月日時分 ,接著再利用換算過後的年月日時分再一次換算成九極格式。

九極格式

名稱 範例 單位與其順序
年極 已亥年 依農民曆算法
月極 戊辰月 依農民曆算法
大段極 戌大段 寅卯辰巳午未申酉戌亥子丑
中段極 酉中段 寅卯辰巳午未申酉戌亥子丑
小段極 水小段 木火土金水
日極 戊子日 依農民曆算法
時極 己未時 依農民曆算法
大刻極 戌大刻 ��寅卯辰巳午未申酉戌亥子丑
小刻極 陰小刻 陽陰

安裝

$ npm install nine-limit

使用

toString()

const nineLimit = new NineLimit('2019-03-19 03:25')
  .toString()

console.log(nineLimit)
// 乙亥年 丁卯月 午大段 亥中斷 火小段 乙卯日 戊寅時 辰大刻 陽小刻

toObject()

const nineLimit = new NineLimit('2019-03-19 03:25')
  .toObject()

console.log(nineLimit)
// { yearLimit: { label: '年極', value: '己亥', unit: '年' },
//   monthLimit: { label: '月極', value: '戊辰', unit: '月' },
//   largeSegmentLimit: { label: '大段極', value: '酉', unit: '大段' },
//   mediumSegmentLimit: { label: '中段極', value: '亥', unit: '中段' },
//   smallSegmentLimit: { label: '小段極', value: '水', unit: '小段' },
//   dayLimit: { label: '日極', value: '辛卯', unit: '日' },
//   hourLimit: { label: '時極', value: '乙未', unit: '時' },
//   largeQuaterLimit: { label: '大刻極', value: '辰', unit: '大刻' },
//   smallQuaterLimit: { label: '小刻極', value: '陽', unit: '小刻' }
//  }

nine-limit's People

Contributors

dependabot[bot] avatar yo8568 avatar

Watchers

 avatar  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.