[{"data":1,"prerenderedAt":356},["ShallowReactive",2],{"content-zh-TW-getting-started":3},{"doc":4,"debug":326},{"id":5,"title":6,"body":7,"description":23,"extension":320,"meta":321,"navigation":88,"path":322,"seo":323,"stem":324,"__hash__":325},"content\u002Fzh-TW\u002Fgetting-started.md","快速開始",{"type":8,"value":9,"toc":312},"minimark",[10,13,17,46,67,71,119,134,158,162,187,190,246,249,269,272,308],[11,12,6],"h1",{"id":6},[14,15,16],"h2",{"id":16},"安裝",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-bash shiki shiki-themes github-light","dotnet add package Ozakboy.TaiwanKit.Ganzhi.NET\n","bash","",[25,26,27],"code",{"__ignoreMap":23},[28,29,32,36,40,43],"span",{"class":30,"line":31},"line",1,[28,33,35],{"class":34},"s7eDp","dotnet",[28,37,39],{"class":38},"sYBdl"," add",[28,41,42],{"class":38}," package",[28,44,45],{"class":38}," Ozakboy.TaiwanKit.Ganzhi.NET\n",[47,48,49,50,53,54,53,57,53,60,53,63,66],"p",{},"支援框架：",[25,51,52],{},"netstandard2.0"," \u002F ",[25,55,56],{},"netstandard2.1",[25,58,59],{},"net8.0",[25,61,62],{},"net9.0",[25,64,65],{},"net10.0","，零執行期依賴、離線可用。",[14,68,70],{"id":69},"國曆-農曆互轉","國曆 ↔ 農曆互轉",[18,72,76],{"className":73,"code":74,"language":75,"meta":23,"style":23},"language-csharp shiki shiki-themes github-light","using Ozakboy.TaiwanKit.Ganzhi.NET;\n\nLunarDate lunar = LunarConverter.ToLunar(new DateTime(2026, 2, 17));\n\u002F\u002F lunar.Year=2026, Month=1, Day=1, IsLeapMonth=false\n\u002F\u002F lunar.ToString() → \"2026年正月初一\"\n\nDateTime solar = LunarConverter.ToSolar(new LunarDate(2026, 8, 15));   \u002F\u002F 中秋 → 2026-09-25\n","csharp",[25,77,78,83,90,96,102,108,113],{"__ignoreMap":23},[28,79,80],{"class":30,"line":31},[28,81,82],{},"using Ozakboy.TaiwanKit.Ganzhi.NET;\n",[28,84,86],{"class":30,"line":85},2,[28,87,89],{"emptyLinePlaceholder":88},true,"\n",[28,91,93],{"class":30,"line":92},3,[28,94,95],{},"LunarDate lunar = LunarConverter.ToLunar(new DateTime(2026, 2, 17));\n",[28,97,99],{"class":30,"line":98},4,[28,100,101],{},"\u002F\u002F lunar.Year=2026, Month=1, Day=1, IsLeapMonth=false\n",[28,103,105],{"class":30,"line":104},5,[28,106,107],{},"\u002F\u002F lunar.ToString() → \"2026年正月初一\"\n",[28,109,111],{"class":30,"line":110},6,[28,112,89],{"emptyLinePlaceholder":88},[28,114,116],{"class":30,"line":115},7,[28,117,118],{},"DateTime solar = LunarConverter.ToSolar(new LunarDate(2026, 8, 15));   \u002F\u002F 中秋 → 2026-09-25\n",[47,120,121,125,126,129,130,133],{},[122,123,124],"strong",{},"閏月","以 ",[25,127,128],{},"IsLeapMonth"," 明確表示；不存在的日期（沒有的閏月、小月三十）用 ",[25,131,132],{},"TryToSolar"," 優雅處理：",[18,135,137],{"className":73,"code":136,"language":75,"meta":23,"style":23},"LunarConverter.GetLeapMonth(2025);   \u002F\u002F 6（2025 閏六月）\n\nLunarConverter.TryToSolar(new LunarDate(2023, 2, 15, isLeapMonth: true), out DateTime d);   \u002F\u002F true（2023 有閏二月）\nLunarConverter.TryToSolar(new LunarDate(2026, 5, 5, isLeapMonth: true), out _);             \u002F\u002F false（2026 無閏月）\n",[25,138,139,144,148,153],{"__ignoreMap":23},[28,140,141],{"class":30,"line":31},[28,142,143],{},"LunarConverter.GetLeapMonth(2025);   \u002F\u002F 6（2025 閏六月）\n",[28,145,146],{"class":30,"line":85},[28,147,89],{"emptyLinePlaceholder":88},[28,149,150],{"class":30,"line":92},[28,151,152],{},"LunarConverter.TryToSolar(new LunarDate(2023, 2, 15, isLeapMonth: true), out DateTime d);   \u002F\u002F true（2023 有閏二月）\n",[28,154,155],{"class":30,"line":98},[28,156,157],{},"LunarConverter.TryToSolar(new LunarDate(2026, 5, 5, isLeapMonth: true), out _);             \u002F\u002F false（2026 無閏月）\n",[14,159,161],{"id":160},"二十四節氣精確到分台灣時間","二十四節氣（精確到分，台灣時間）",[18,163,165],{"className":73,"code":164,"language":75,"meta":23,"style":23},"SolarTerms.GetExactTime(2026, SolarTerm.LiChun);        \u002F\u002F 2026-02-04 04:02\nSolarTerms.GetYearTerms(2026);                          \u002F\u002F 全年 24 筆（含精確時刻與中文名）\nSolarTerms.GetCurrentTerm(new DateTime(2026, 2, 10));   \u002F\u002F 立春（所屬節氣區段）\nSolarTerms.TryGetTermOfDay(new DateTime(2026, 2, 4), out var term);   \u002F\u002F true，當天是立春交接日\n",[25,166,167,172,177,182],{"__ignoreMap":23},[28,168,169],{"class":30,"line":31},[28,170,171],{},"SolarTerms.GetExactTime(2026, SolarTerm.LiChun);        \u002F\u002F 2026-02-04 04:02\n",[28,173,174],{"class":30,"line":85},[28,175,176],{},"SolarTerms.GetYearTerms(2026);                          \u002F\u002F 全年 24 筆（含精確時刻與中文名）\n",[28,178,179],{"class":30,"line":92},[28,180,181],{},"SolarTerms.GetCurrentTerm(new DateTime(2026, 2, 10));   \u002F\u002F 立春（所屬節氣區段）\n",[28,183,184],{"class":30,"line":98},[28,185,186],{},"SolarTerms.TryGetTermOfDay(new DateTime(2026, 2, 4), out var term);   \u002F\u002F true，當天是立春交接日\n",[14,188,189],{"id":189},"干支四柱與生肖",[18,191,193],{"className":73,"code":192,"language":75,"meta":23,"style":23},"\u002F\u002F 年柱界線可選：立春（命理慣例，預設）或正月初一（民俗慣例）\nGanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10));                            \u002F\u002F 丙午（立春界）\nGanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10), YearBoundary.LunarNewYear); \u002F\u002F 乙巳（初一界）\n\n\u002F\u002F 四柱（八字）：月柱依節氣精確時刻切換、23:00 起日柱歸次日\nFourPillars p = GanzhiCalendar.GetFourPillars(new DateTime(2026, 2, 20, 10, 0, 0));\nConsole.WriteLine(p);   \u002F\u002F 例如 \"丙午 庚寅 甲子 己巳\"\n\n\u002F\u002F 生肖\nGanzhiCalendar.GetZodiac(new DateTime(2026, 6, 1));   \u002F\u002F Zodiac.Horse（馬）\n",[25,194,195,200,205,210,214,219,224,229,234,240],{"__ignoreMap":23},[28,196,197],{"class":30,"line":31},[28,198,199],{},"\u002F\u002F 年柱界線可選：立春（命理慣例，預設）或正月初一（民俗慣例）\n",[28,201,202],{"class":30,"line":85},[28,203,204],{},"GanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10));                            \u002F\u002F 丙午（立春界）\n",[28,206,207],{"class":30,"line":92},[28,208,209],{},"GanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10), YearBoundary.LunarNewYear); \u002F\u002F 乙巳（初一界）\n",[28,211,212],{"class":30,"line":98},[28,213,89],{"emptyLinePlaceholder":88},[28,215,216],{"class":30,"line":104},[28,217,218],{},"\u002F\u002F 四柱（八字）：月柱依節氣精確時刻切換、23:00 起日柱歸次日\n",[28,220,221],{"class":30,"line":110},[28,222,223],{},"FourPillars p = GanzhiCalendar.GetFourPillars(new DateTime(2026, 2, 20, 10, 0, 0));\n",[28,225,226],{"class":30,"line":115},[28,227,228],{},"Console.WriteLine(p);   \u002F\u002F 例如 \"丙午 庚寅 甲子 己巳\"\n",[28,230,232],{"class":30,"line":231},8,[28,233,89],{"emptyLinePlaceholder":88},[28,235,237],{"class":30,"line":236},9,[28,238,239],{},"\u002F\u002F 生肖\n",[28,241,243],{"class":30,"line":242},10,[28,244,245],{},"GanzhiCalendar.GetZodiac(new DateTime(2026, 6, 1));   \u002F\u002F Zodiac.Horse（馬）\n",[14,247,248],{"id":248},"農曆節日",[18,250,252],{"className":73,"code":251,"language":75,"meta":23,"style":23},"LunarFestivals.TryGetFestival(new DateTime(2026, 6, 19), out var f);   \u002F\u002F true, DragonBoat（端午）\nLunarFestivals.GetFestivalDate(2026, LunarFestival.MidAutumn);         \u002F\u002F 2026-09-25\nLunarFestivals.GetFestivalDate(2026, LunarFestival.LunarNewYearEve);   \u002F\u002F 2026-02-16（除夕）\n",[25,253,254,259,264],{"__ignoreMap":23},[28,255,256],{"class":30,"line":31},[28,257,258],{},"LunarFestivals.TryGetFestival(new DateTime(2026, 6, 19), out var f);   \u002F\u002F true, DragonBoat（端午）\n",[28,260,261],{"class":30,"line":85},[28,262,263],{},"LunarFestivals.GetFestivalDate(2026, LunarFestival.MidAutumn);         \u002F\u002F 2026-09-25\n",[28,265,266],{"class":30,"line":92},[28,267,268],{},"LunarFestivals.GetFestivalDate(2026, LunarFestival.LunarNewYearEve);   \u002F\u002F 2026-02-16（除夕）\n",[14,270,271],{"id":271},"重要語意",[273,274,275,282,289,299,305],"ul",{},[276,277,278,281],"li",{},[122,279,280],{},"所有時間皆為台灣時間（UTC+8）","，不做時區換算",[276,283,284,285,288],{},"年柱界線預設以",[122,286,287],{},"立春交接分鐘","為界：2026-02-04 04:01 → 乙巳、04:02 → 丙午",[276,290,291,294,295,298],{},[25,292,293],{},"GetDayGanzhi"," 以日曆日為準（00:00 換日）；",[25,296,297],{},"GetFourPillars"," 採八字慣例 23:00 換日",[276,300,301,304],{},[122,302,303],{},"閏月不算節日","（閏五月初五不是端午）",[276,306,307],{},"超出支援範圍（1901-02-19 ～ 2100-12-31）一律拋例外，絕不外插曆法",[309,310,311],"style",{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":23,"searchDepth":85,"depth":92,"links":313},[314,315,316,317,318,319],{"id":16,"depth":85,"text":16},{"id":69,"depth":85,"text":70},{"id":160,"depth":85,"text":161},{"id":189,"depth":85,"text":189},{"id":248,"depth":85,"text":248},{"id":271,"depth":85,"text":271},"md",{},"\u002Fzh-tw\u002Fgetting-started",{"title":6,"description":23},"zh-TW\u002Fgetting-started","k-x_t6Qg78oJZmw6TkCJhwZncIOhZ0TCsLD1PptLyHg",{"matched":327,"target":328,"all":329},"fallback (.all() + manual match)","\u002Fzh-TW\u002Fgetting-started",[330,335,340,345,350,355],{"path":331,"id":332,"stem":333,"title":334},"\u002Fen\u002Fapi","content\u002Fen\u002Fapi.md","en\u002Fapi","API Reference",{"path":336,"id":337,"stem":338,"title":339},"\u002Fen\u002Fchangelog","content\u002Fen\u002Fchangelog.md","en\u002Fchangelog","Changelog",{"path":341,"id":342,"stem":343,"title":344},"\u002Fen\u002Fgetting-started","content\u002Fen\u002Fgetting-started.md","en\u002Fgetting-started","Getting Started",{"path":346,"id":347,"stem":348,"title":349},"\u002Fzh-tw\u002Fapi","content\u002Fzh-TW\u002Fapi.md","zh-TW\u002Fapi","API 參考",{"path":351,"id":352,"stem":353,"title":354},"\u002Fzh-tw\u002Fchangelog","content\u002Fzh-TW\u002Fchangelog.md","zh-TW\u002Fchangelog","更新紀錄",{"path":322,"id":5,"stem":324,"title":6},1783231660621]