micah-akpan / sign-teller

Sign Teller is a library for telling zodiac signs
MIT License
6 stars 3 forks source link

Incorrect Pisces dates 4/20 #13

Closed jgiunta1 closed 4 years ago

jgiunta1 commented 4 years ago

Hey this API is awesome, I think you all did some great work! I just wanted to point out a small issue with the Pisces dates.

Summary

4/20 is registered as Pisces when it should be Taurus. The pisces date range is incorrect compared to the reference docs linked here: https://www.npmjs.com/package/sign-teller/v/3.1.2

See: https://www.horoscope.com/zodiac-signs for correct date ranges

Steps to reproduce

Run the following with Jest

signHelper.js

export function getSign(date) {
  const tellSign = require('sign-teller');
  const dateOfBirth = { day: date.getDate(), month: date.getMonth() + 1 };
  return tellSign(dateOfBirth);
}

signHelper.test.js

import {getSign} from '../../src/utils/signHelper.js';
test('Verifies Taurus given March birth date', () => {
  const date = new Date('April 20, 1995 23:15:30');
  console.log(getSign(date));
  expect(getSign(date).sign).toBe("Taurus");
});

Output

    Expected: "Taurus"
    Received: "Pisces"

  console.log
    {
      from: 'March 10',
      to: 'April 20',
      sign: 'Pisces',
      facts: [ 'Creative', 'Sensitive', 'Artistic' ],
      element: 'Water',
      luckyGem: 'Moonstone'
    }
jgiunta1 commented 4 years ago

After setting "type" to tropical I'm actually getting Aries which makes more sense

micah-akpan commented 4 years ago

After setting "type" to tropical I'm actually getting Aries which makes more sense

Okay. @jgiunta1 Thanks for taking the time to try out the library. Feel free to contribute (new features) as you see fit.