ပုံများ အား mindmaestro.co.uk မှယူသုံးထားပါသည်။
Summary Date ရွေးမယ် ရလာတာကို Zodiac Sign Logic နဲ့ တွက်ချက်မယ် ရလာတဲ့ Data ကို ချိတ်ဆက်ပြီး ပြသမယ်
| Contributors | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
တရုတ်ရာသီခွင့်နှင့်ပတ်သတ်သော Logic ကို ဤတွင်ကြည့်ရှုနိုင်ပါသည်။
Chinese Zodiac Logic ကို ပြန် Change ပေးထားပါတယ်။
Arkar Myo Min မှကူညီပေးထားပါတယ်။
အောက်က Link မှာလည်း JavaScript Code နဲ့ ရေးထားပေးတာမို့ သွားစမ်းကြည့်လို့ရပါတယ်။
https://playcode.io/1636595
Reference - https://www.knowprogram.com/js/chinese-zodiac-calculator-in-javascript/
function getChineseZodiacSign(birthYear) { const zodiacAnimals = ['Monkey 🐒', 'Rooster 🐓', 'Dog 🐕', 'Pig 🐖', 'Rat 🐀', 'Ox 🐂', 'Tiger 🐅', 'Rabbit 🐇', 'Dragon 🐉', 'Snake 🐍', 'Horse 🐎', 'Sheep 🐑']; // Calculate the Chinese zodiac year. const zodiacYear = birthYear % 12; // Return the Chinese zodiac animal for the calculated year. return zodiacAnimals[zodiacYear]; } // Usage example const birthYear = 2024; // Replace with the desired birth year const chineseZodiac = getChineseZodiacSign(birthYear); console.log(`Chinese zodiac sign: ${chineseZodiac}`);
နက္ခတ်ရာသီခွင်နှင့်ပတ်သက်သော Logic များကိုဤတွင်ကြည့်ရှုနိုင်ပါသည်
const { getHoroscope } = require("./zodiac"); // Usage example const birthDate = "1990-08-15"; // Replace with the desired birth date try { const zodiacSign = getHoroscope(birthDate); console.log(`Zodiac sign: ${zodiacSign}`); } catch (error) { console.error(error.message); }