fix: zodiac sign dates

This commit is contained in:
gofnnp 2023-08-21 19:45:17 +04:00
parent 9770c0c8e6
commit 8d99442111

View File

@ -5,6 +5,6 @@ export const getZodiacSignByDate = (birthDate: string): string => {
const day = date.getDate()
const month = date.getMonth() + 1
const zodiac =['Capricorn', 'Aquarius', 'Pisces', 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn']
const last_day =[19, 18, 20, 20, 21, 21, 22, 22, 21, 22, 21, 20, 19]
const last_day =[19, 18, 20, 19, 20, 20, 22, 22, 22, 22, 21, 21]
return (day > last_day[month - 1]) ? zodiac[month*1] : zodiac[month - 1]
}