An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/besrourms/ZodiacSigns/blob/main/LICENSE)
[![](https://data.jsdelivr.com/v1/package/gh/besrourms/ZodiacSigns/badge)](https://www.jsdelivr.com/package/gh/besrourms/ZodiacSigns)
[![JSR](https://jsr.io/badges/@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