Rebornian48 / ZodiacSigns

Get the Zodiac Sign / Chinese Zodiac Sign for a date in JavaScript

Home Page:https://dev.to/besrourms/get-the-zodiac-sign-for-a-date-in-javascript-4d81

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT

Zodiac Signs / Chinese Zodiac Signs

Provides a zodiac sign & chinese zodiac sign depending a birthday

Installation

<script src="https://cdn.jsdelivr.net/gh/besrourms/zodiacsigns@latest/index.min.js"></script>

Examples

Getting a zodiac sign from a date

// Return 'Sagittarius: The Archer'
console.log(new ZodiacSign('1991-11-30').sign)

Getting a chinese zodiac sign from a date

// Return {"sign": "Rat", "element": "Fire", "yinyang": "Yang"}
console.log(new ZodiacSign('1 Feb 1997 00:12:00 GMT').chinese)

Getting a sign with translation

// Overload the default language (format xx)
console.log(new ZodiacSign('1 Feb 1997 00:12:00 GMT', 'ar').chinese);

Translation

For the moment, the only available languages are English, French, Spanish, Arabic, Ukrainian, Chinese, Turkish and Japanese. Fell free to participate to the translation in any other language.

Available languages

  • English (en)
  • French (fr)
  • Spanish (es)
  • Arabic (ar)
  • Ukrainian (ua)
  • Chinese (zh)
  • Turkish (tr)
  • Japanese (ja)
  • Indonesian (id)

About

Get the Zodiac Sign / Chinese Zodiac Sign for a date in JavaScript

https://dev.to/besrourms/get-the-zodiac-sign-for-a-date-in-javascript-4d81

License:MIT License


Languages

Language:TypeScript 57.3%Language:JavaScript 42.7%