简体中文 🔸 English
It's used to obtain the data of The Purple Star Astrology (Zi Wei Dou Shu)
.
Feature list
- To obtain the astrology data by birthday (
Solar calendar
orLunar calendar
) and birth time (Chinese hour
).- basic information(
birthday
,Chinese hour
,sign
,Chinese zodiac
,body lord
,soul lord
etc.) - palace information(
name
,heavenly stem
andearthly branch
,stars
etc.) - star information(
brightness
,mutagen
andtype
) - horoscope information(
decadal
,nominal age
,yearly
,monthly
,daily
,hourly
) - mutagen
- basic information(
- get
mutagen
byheavenly stem
- get
surrounded palaces
by palaceindex
orname
- check whether specific
stars
in a specificpalace
- check whether specific
stars
insurrounded palaces
- multilingual input/output results
you can choose any package manager to install iztro
.
-
NPM
npm install iztro -S
-
Yarn
yarn add iztro
-
pnpm
pnpm install iztro -S
This is a very simple example to show how to use iztro
to get the astrolabe data. please visit develop document for details.
-
ES6 Module
import { astro } from 'iztro'; // get astrolabe data by solar date const astrolabe = astro.astrolabeBySolarDate('2000-8-16', 2, 'male', true, 'en-US'); // get astrolabe data by lunar date const astrolabe = astro.astrolabeByLunarDate('2000-7-17', 2, 'male', false, true, 'en-US');
-
CommonJS
var iztro = require('iztro'); // get astrolabe data by solar date var astrolabe = iztro.astro.astrolabeBySolarDate('2000-8-16', 2, 'male', true, 'en-US'); // get astrolabe data by lunar date var astrolabe = iztro.astro.astrolabeByLunarDate('2000-7-17', 2, 'male', false, true, 'en-US');
If you're interested in iztro
and wish to join us,it's very welcome. You can contribute by:
- create an issue here if you have any good ideas or suggestions.
- report a bug here if you found any bugs.
- you can also
fork
this code to your repository and create PRs for your changes. - also, you can contribute the
localization
files. please refer to locales and create the localization files for your lanuage. - additionally, buy me a coffee is another great way to support me
You can generate an astrolabe by using the returned data. Of course it's just an example. You can focus on astrolabe design or data analyzation. This program solves the most tedious work for you, so that you can put more energy on the things you need to pay attention to.
MIT License
Copyright © 2023 Sylar Long