https://github.com/besrourms/zodiacsigns
Get the Zodiac Sign / Chinese Zodiac Sign for a date in JavaScript
https://github.com/besrourms/zodiacsigns
chinese-zodiac-animals chinese-zodiac-elements zodiac-sign
Last synced: about 1 month ago
JSON representation
Get the Zodiac Sign / Chinese Zodiac Sign for a date in JavaScript
- Host: GitHub
- URL: https://github.com/besrourms/zodiacsigns
- Owner: BesrourMS
- License: mit
- Created: 2022-07-10T16:20:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-10T13:02:35.000Z (7 months ago)
- Last Synced: 2025-03-25T23:41:43.367Z (about 2 months ago)
- Topics: chinese-zodiac-animals, chinese-zodiac-elements, zodiac-sign
- Language: TypeScript
- Homepage: https://dev.to/besrourms/get-the-zodiac-sign-for-a-date-in-javascript-4d81
- Size: 38.1 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/besrourms/ZodiacSigns/blob/main/LICENSE)
[](https://www.jsdelivr.com/package/gh/besrourms/ZodiacSigns)
[](https://jsr.io/@besrourms/zodiacsigns)# Zodiac Signs / Chinese Zodiac Signs
Provides a zodiac sign & chinese zodiac sign depending a birthday
## Installation
```html
```
## Examples
### Getting a zodiac sign from a date
```js
// Return 'Sagittarius: The Archer'
console.log(new ZodiacSign('1991-11-30').sign)
```### Getting a chinese zodiac sign from a date
```js
// Return {"sign": "Rat", "element": "Fire", "yinyang": "Yang"}
console.log(new ZodiacSign('1 Feb 1997 00:12:00 GMT').chinese)
```### Getting a sign with translation
```js
// Overload the default language (format xx)
console.log(new ZodiacSign('1 Feb 1997 00:12:00 GMT', 'ar').chinese);
```## Translation
Fell free to participate to the translation in any language.### Available languages
- English (en) – English
- French (fr) – Français
- Spanish (es) – Español
- Arabic (ar) – العربية
- Ukrainian (ua) – Українська
- Chinese (zh) – 中文
- Turkish (tr) – Türkçe
- Japanese (ja) – 日本語
- Indonesian (id) – Bahasa Indonesia
- German (de) – Deutsch