Giter VIP home page Giter VIP logo

indian-astrology's Introduction

indian-astrology

License Build status Coverage Status downloads

Get the Indian astrological details from the provided birth details as a JSON object. You will also get a prediction based on the calculated details.

Installation

$ npm install indian-astrology

Usage

const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDate(24, 5, 2018, 18, 1, 5, 30, false));
console.log(IndianAstrology.getByDateAndZone(24, 5, 2018, 18, 1, 5.5, false));
console.log(IndianAstrology.getByDateOfIndia(24, 5, 2018, 18, 1));
console.log(IndianAstrology.getByDateWhereTimeUnknown(24, 5, 2018, 5, 30, false));
console.log(IndianAstrology.getByDateWhereTimeUnknownOfIndia(24, 5, 2018));
console.log(IndianAstrology.getCountryListWithZones());
console.log(IndianAstrology.getOnlyCountryNameList());
console.log(IndianAstrology.getTodaysDetails(false));

Sample JSON Response

Note: The zodiac sign here is the Indian rashi equivalent sign. The prediction is based on the rashi alone as of now.

{
  "rashi": "Kanya",
  "zodiacSign": "Virgo",
  "moonAngle": "22°49'37\"",
  "nakshatra": "Hasta",
  "birthDasha": "Mon/Sun/Rah",
  "birthDate": "25-5-2018",
  "birthTime": "19:5",
  "dayOfWeek": "Friday",
  "birthTimeZone": 5.5,
  "currentDasha": "Mon/Sun/Rah",
  "prediction": "This is a sample prediction based on zodiac sign."
}

API

getByDate(day, month, year, hour, minute, timeZoneHour, timeZoneMinute, dayLightSaving)

Gives JSON object having the astrological details of given data.

  • day {number} - The birth day.
  • month {number} - The birth month.
  • year {number} - The birth year.
  • hour {number} - The birth hour in 24 hour format.
  • minute {number} - The birth minute.
  • timeZoneHour {number} - The birth timezone hour.
  • timeZoneMinute {number} - The birth timezone minute.
  • dayLightSaving {boolean} - The true or false value of daylight saving.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDate(24, 5, 2018, 18, 1, 5, 30, false));

getByDateAndZone(day, month, year, hour, minute, timeZone, dayLightSaving)

Gives JSON object having the astrological details of given data.

  • day {number} - The birth day.
  • month {number} - The birth month.
  • year {number} - The birth year.
  • hour {number} - The birth hour in 24 hour format.
  • minute {number} - The birth minute.
  • timeZone {number} - The birth timezone.
  • dayLightSaving {boolean} - The true or false value of daylight saving.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDateAndZone(24, 5, 2018, 18, 1, 5.5, false));

getByDateOfIndia(day, month, year, hour, minute)

Gives JSON object having the astrological details of given data.

  • day {number} - The birth day.
  • month {number} - The birth month.
  • year {number} - The birth year.
  • hour {number} - The birth hour in 24 hour format.
  • minute {number} - The birth minute.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDateOfIndia(24, 5, 2018, 18, 1));

getByDateWhereTimeUnknown(day, month, year, timeZoneHour, timeZoneMinute, dayLightSaving)

Gives JSON object having the astrological details of given data.

  • day {number} - The birth day.
  • month {number} - The birth month.
  • year {number} - The birth year.
  • timeZoneHour {number} - The birth timezone hour.
  • timeZoneMinute {number} - The birth timezone minute.
  • dayLightSaving {boolean} - The true or false value of daylight saving.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDateWhereTimeUnknown(24, 5, 2018, 5, 30, false));

getByDateWhereTimeUnknownOfIndia(day, month, year)

Gives JSON object having the astrological details of given data.

  • day {number} - The birth day.
  • month {number} - The birth month.
  • year {number} - The birth year.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getByDateWhereTimeUnknownOfIndia(24, 5, 2018));

getCountryListWithZones()

Gives JSON object having the country list along with mapped timezones.

const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getCountryListWithZones());

getOnlyCountryNameList()

Gives JSON array having the country names.

const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getOnlyCountryNameList());

getTodaysDetails(dayLightSaving)

Gives JSON object having the astrological details of present day.

  • dayLightSaving {boolean} - The true or false value of daylight saving.
const IndianAstrology = require('indian-astrology');

console.log(IndianAstrology.getTodaysDetails(false));

Lint, Test and Build

npm run validate

Build

npm run build

Test

npm test

With ❤️ by

License

MIT license. Copyright © 2018.

indian-astrology's People

Contributors

narendra-kamath 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.