| |
| |
| |
|
|
|
|
| const STEMS = ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"];
|
| const BRANCHES = ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"];
|
|
|
| const SAJU_DESCRIPTIONS = {
|
| "甲": "Yang Wood Element: executive leadership, CEO, managing director, political pioneer, independent entrepreneur, authoritative figure.",
|
| "乙": "Yin Wood Element: diplomat, negotiator, counselor, therapist, public relations, networking, educator, social worker.",
|
| "丙": "Yang Fire Element: charismatic speaker, television presenter, actor, motivational speaker, marketing manager, public sales, public figure.",
|
| "丁": "Yin Fire Element: precise detail-oriented, researcher, data analyst, software engineer, academic scholar, scientific inspector.",
|
| "戊": "Yang Earth Element: solid reliable, real estate, construction, banker, wealth management, traditional conservator, agriculture magnate.",
|
| "己": "Yin Earth Element: nurturing services, human resources, nursing care, hospitality, customer service, administrator, productive organizer.",
|
| "庚": "Yang Metal Element: justice enforcer, military officer, litigation lawyer, judge, surgeon, martial arts, security, police executive.",
|
| "辛": "Yin Metal Element: elegant luxury, jewelry design, high fashion, fine arts, aesthetic precision, literary critic, plastic surgeon, brilliant singer.",
|
| "壬": "Yang Water Element: dynamic international trade, logistics, global traveler, international diplomat, strategist, global CEO, maritime business.",
|
| "癸": "Yin Water Element: intuitive psychologist, occultist, profound deep writer, silent strategy, undercover analyst, philosophical wise private investigator.",
|
| "子": "Rat: astute ambitious, business intelligence, finance accounting, analytical observer, strategic sociability.",
|
| "丑": "Ox: hardworking methodical, manufacturing, systematic operations, reliable rigorous execution, routine manager.",
|
| "寅": "Tiger: brave competitive, risk-taking entrepreneur, venture capitalist, competitive sports, disruptive impulse creator.",
|
| "卯": "Rabbit: peaceful literary, design fine arts, soft diplomacy, sensitive therapist, evasive pacifist aesthetics.",
|
| "辰": "Dragon: proud visionary, technology dreamer, eccentric leadership, radical innovation, tech entrepreneur, bold inventor.",
|
| "巳": "Snake: philosophical enigmatic, occult psychology, complex market analysis, political strategy, calculating wisdom.",
|
| "午": "Horse: adventurous traveling sales, foreign relations, journalism, independent franchises, assertive frankness explorer.",
|
| "未": "Goat: creative healer, medical doctor, alternative medicine, empathetic design, social caregiver, holistic ecology artisan.",
|
| "申": "Monkey: resourceful agile programmer, software engineering, ethical hacking, comedian, fun inventive opportunistic seeker.",
|
| "酉": "Rooster: perfectionist auditing, quality control, text editing writing, forensic analysis, critical eloquence.",
|
| "戌": "Dog: loyal honest, civil protection, civil rights advocacy, activist, bodyguard, institutional loyalty anxious welfare.",
|
| "亥": "Pig: generous tolerant, food industry, leisure hospitality luxury, philanthropy donations, sensual peaceful enjoyment."
|
| };
|
|
|
| |
| |
| |
| |
|
|
| function getSajuPillars(date) {
|
| const year = date.getFullYear();
|
| const month = date.getMonth() + 1;
|
| const day = date.getDate();
|
|
|
|
|
| const yearStemIdx = (year - 4) % 10;
|
| const yearBranchIdx = (year - 4) % 12;
|
| const yearPillar = STEMS[yearStemIdx] + BRANCHES[yearBranchIdx];
|
|
|
|
|
| let calcMonth = month;
|
| if (month < 2) calcMonth += 12;
|
| const firstMonthStemIdx = ((yearStemIdx % 5) * 2 + 2) % 10;
|
| const monthOffset = calcMonth - 2;
|
| const monthStemIdx = (firstMonthStemIdx + monthOffset) % 10;
|
| const monthBranchIdx = (2 + monthOffset) % 12;
|
| const monthPillar = STEMS[monthStemIdx] + BRANCHES[monthBranchIdx];
|
|
|
|
|
| const baseDate = new Date(1900, 0, 1);
|
| const deltaDays = Math.floor((date - baseDate) / (1000 * 60 * 60 * 24));
|
| const dayStemIdx = (0 + deltaDays) % 10;
|
| const dayBranchIdx = (10 + deltaDays) % 12;
|
| const dayPillar = STEMS[dayStemIdx] + BRANCHES[dayBranchIdx];
|
|
|
| const prefix = "Professional career profile based on astrology: ";
|
| const pillars = [yearPillar, monthPillar, dayPillar];
|
| const names = ["Year", "Month", "Day"];
|
|
|
| let baseTexts = [];
|
| let rawBase = pillars;
|
|
|
| for (let i = 0; i < 3; i++) {
|
| const pillar = pillars[i];
|
| const desc = SAJU_DESCRIPTIONS[pillar[0]] + " " + SAJU_DESCRIPTIONS[pillar[1]];
|
| baseTexts.push(`${prefix} ${names[i]} Pillar: ${desc}`.trim());
|
| }
|
|
|
|
|
| let timeTexts = [];
|
| let rawTime = [];
|
| const firstHourStemIdx = ((dayStemIdx % 5) * 2) % 10;
|
|
|
| for (let hIdx = 0; hIdx < 12; hIdx++) {
|
| const hStemIdx = (firstHourStemIdx + hIdx) % 10;
|
| const hPillar = STEMS[hStemIdx] + BRANCHES[hIdx];
|
| const desc = SAJU_DESCRIPTIONS[hPillar[0]] + " " + SAJU_DESCRIPTIONS[hPillar[1]];
|
| timeTexts.push(`${prefix} Time Pillar: ${desc}`.trim());
|
| rawTime.push(hPillar);
|
| }
|
|
|
| return { baseTexts, timeTexts, rawBase, rawTime };
|
| }
|
|
|
|
|
| if (typeof module !== 'undefined' && module.exports) {
|
| module.exports = { getSajuPillars, STEMS, BRANCHES, SAJU_DESCRIPTIONS };
|
| }
|
|
|