[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"content-en-getting-started":3},{"doc":4,"debug":331},{"id":5,"title":6,"body":7,"description":25,"extension":325,"meta":326,"navigation":90,"path":327,"seo":328,"stem":329,"__hash__":330},"content\u002Fen\u002Fgetting-started.md","Getting Started",{"type":8,"value":9,"toc":317},"minimark",[10,14,19,48,69,73,121,136,160,164,189,193,249,253,273,277,313],[11,12,6],"h1",{"id":13},"getting-started",[15,16,18],"h2",{"id":17},"install","Install",[20,21,26],"pre",{"className":22,"code":23,"language":24,"meta":25,"style":25},"language-bash shiki shiki-themes github-light","dotnet add package Ozakboy.TaiwanKit.Ganzhi.NET\n","bash","",[27,28,29],"code",{"__ignoreMap":25},[30,31,34,38,42,45],"span",{"class":32,"line":33},"line",1,[30,35,37],{"class":36},"s7eDp","dotnet",[30,39,41],{"class":40},"sYBdl"," add",[30,43,44],{"class":40}," package",[30,46,47],{"class":40}," Ozakboy.TaiwanKit.Ganzhi.NET\n",[49,50,51,52,55,56,55,59,55,62,55,65,68],"p",{},"Supported frameworks: ",[27,53,54],{},"netstandard2.0"," \u002F ",[27,57,58],{},"netstandard2.1",[27,60,61],{},"net8.0",[27,63,64],{},"net9.0",[27,66,67],{},"net10.0",". Zero runtime dependencies, works fully offline.",[15,70,72],{"id":71},"gregorian-lunar-conversion","Gregorian ↔ lunar conversion",[20,74,78],{"className":75,"code":76,"language":77,"meta":25,"style":25},"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 Mid-Autumn → 2026-09-25\n","csharp",[27,79,80,85,92,98,104,110,115],{"__ignoreMap":25},[30,81,82],{"class":32,"line":33},[30,83,84],{},"using Ozakboy.TaiwanKit.Ganzhi.NET;\n",[30,86,88],{"class":32,"line":87},2,[30,89,91],{"emptyLinePlaceholder":90},true,"\n",[30,93,95],{"class":32,"line":94},3,[30,96,97],{},"LunarDate lunar = LunarConverter.ToLunar(new DateTime(2026, 2, 17));\n",[30,99,101],{"class":32,"line":100},4,[30,102,103],{},"\u002F\u002F lunar.Year=2026, Month=1, Day=1, IsLeapMonth=false\n",[30,105,107],{"class":32,"line":106},5,[30,108,109],{},"\u002F\u002F lunar.ToString() → \"2026年正月初一\"\n",[30,111,113],{"class":32,"line":112},6,[30,114,91],{"emptyLinePlaceholder":90},[30,116,118],{"class":32,"line":117},7,[30,119,120],{},"DateTime solar = LunarConverter.ToSolar(new LunarDate(2026, 8, 15));   \u002F\u002F Mid-Autumn → 2026-09-25\n",[49,122,123,127,128,131,132,135],{},[124,125,126],"strong",{},"Leap months"," are explicitly flagged via ",[27,129,130],{},"IsLeapMonth","; non-existent dates (missing leap month, day 30 of a short month) are handled gracefully with ",[27,133,134],{},"TryToSolar",":",[20,137,139],{"className":75,"code":138,"language":77,"meta":25,"style":25},"LunarConverter.GetLeapMonth(2025);   \u002F\u002F 6 (2025 has a leap 6th month)\n\nLunarConverter.TryToSolar(new LunarDate(2023, 2, 15, isLeapMonth: true), out DateTime d);   \u002F\u002F true\nLunarConverter.TryToSolar(new LunarDate(2026, 5, 5, isLeapMonth: true), out _);             \u002F\u002F false (no leap month in 2026)\n",[27,140,141,146,150,155],{"__ignoreMap":25},[30,142,143],{"class":32,"line":33},[30,144,145],{},"LunarConverter.GetLeapMonth(2025);   \u002F\u002F 6 (2025 has a leap 6th month)\n",[30,147,148],{"class":32,"line":87},[30,149,91],{"emptyLinePlaceholder":90},[30,151,152],{"class":32,"line":94},[30,153,154],{},"LunarConverter.TryToSolar(new LunarDate(2023, 2, 15, isLeapMonth: true), out DateTime d);   \u002F\u002F true\n",[30,156,157],{"class":32,"line":100},[30,158,159],{},"LunarConverter.TryToSolar(new LunarDate(2026, 5, 5, isLeapMonth: true), out _);             \u002F\u002F false (no leap month in 2026)\n",[15,161,163],{"id":162},"_24-solar-terms-minute-precision-taiwan-time","24 solar terms (minute precision, Taiwan time)",[20,165,167],{"className":75,"code":166,"language":77,"meta":25,"style":25},"SolarTerms.GetExactTime(2026, SolarTerm.LiChun);        \u002F\u002F 2026-02-04 04:02\nSolarTerms.GetYearTerms(2026);                          \u002F\u002F all 24 terms with exact times\nSolarTerms.GetCurrentTerm(new DateTime(2026, 2, 10));   \u002F\u002F LiChun (governing term)\nSolarTerms.TryGetTermOfDay(new DateTime(2026, 2, 4), out var term);   \u002F\u002F true — transition day\n",[27,168,169,174,179,184],{"__ignoreMap":25},[30,170,171],{"class":32,"line":33},[30,172,173],{},"SolarTerms.GetExactTime(2026, SolarTerm.LiChun);        \u002F\u002F 2026-02-04 04:02\n",[30,175,176],{"class":32,"line":87},[30,177,178],{},"SolarTerms.GetYearTerms(2026);                          \u002F\u002F all 24 terms with exact times\n",[30,180,181],{"class":32,"line":94},[30,182,183],{},"SolarTerms.GetCurrentTerm(new DateTime(2026, 2, 10));   \u002F\u002F LiChun (governing term)\n",[30,185,186],{"class":32,"line":100},[30,187,188],{},"SolarTerms.TryGetTermOfDay(new DateTime(2026, 2, 4), out var term);   \u002F\u002F true — transition day\n",[15,190,192],{"id":191},"ganzhi-four-pillars-zodiac","Ganzhi four pillars & zodiac",[20,194,196],{"className":75,"code":195,"language":77,"meta":25,"style":25},"\u002F\u002F Year boundary: LiChun exact time (fortune-telling convention, default) or Lunar New Year (folk)\nGanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10));                            \u002F\u002F 丙午 (LiChun)\nGanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10), YearBoundary.LunarNewYear); \u002F\u002F 乙巳 (folk)\n\n\u002F\u002F Four pillars (Bazi): month pillars switch at exact term times; day switches at 23:00\nFourPillars p = GanzhiCalendar.GetFourPillars(new DateTime(2026, 2, 20, 10, 0, 0));\nConsole.WriteLine(p);   \u002F\u002F e.g. \"丙午 庚寅 甲子 己巳\"\n\n\u002F\u002F Zodiac\nGanzhiCalendar.GetZodiac(new DateTime(2026, 6, 1));   \u002F\u002F Zodiac.Horse\n",[27,197,198,203,208,213,217,222,227,232,237,243],{"__ignoreMap":25},[30,199,200],{"class":32,"line":33},[30,201,202],{},"\u002F\u002F Year boundary: LiChun exact time (fortune-telling convention, default) or Lunar New Year (folk)\n",[30,204,205],{"class":32,"line":87},[30,206,207],{},"GanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10));                            \u002F\u002F 丙午 (LiChun)\n",[30,209,210],{"class":32,"line":94},[30,211,212],{},"GanzhiCalendar.GetYearGanzhi(new DateTime(2026, 2, 10), YearBoundary.LunarNewYear); \u002F\u002F 乙巳 (folk)\n",[30,214,215],{"class":32,"line":100},[30,216,91],{"emptyLinePlaceholder":90},[30,218,219],{"class":32,"line":106},[30,220,221],{},"\u002F\u002F Four pillars (Bazi): month pillars switch at exact term times; day switches at 23:00\n",[30,223,224],{"class":32,"line":112},[30,225,226],{},"FourPillars p = GanzhiCalendar.GetFourPillars(new DateTime(2026, 2, 20, 10, 0, 0));\n",[30,228,229],{"class":32,"line":117},[30,230,231],{},"Console.WriteLine(p);   \u002F\u002F e.g. \"丙午 庚寅 甲子 己巳\"\n",[30,233,235],{"class":32,"line":234},8,[30,236,91],{"emptyLinePlaceholder":90},[30,238,240],{"class":32,"line":239},9,[30,241,242],{},"\u002F\u002F Zodiac\n",[30,244,246],{"class":32,"line":245},10,[30,247,248],{},"GanzhiCalendar.GetZodiac(new DateTime(2026, 6, 1));   \u002F\u002F Zodiac.Horse\n",[15,250,252],{"id":251},"lunar-festivals","Lunar festivals",[20,254,256],{"className":75,"code":255,"language":77,"meta":25,"style":25},"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",[27,257,258,263,268],{"__ignoreMap":25},[30,259,260],{"class":32,"line":33},[30,261,262],{},"LunarFestivals.TryGetFestival(new DateTime(2026, 6, 19), out var f);   \u002F\u002F true, DragonBoat\n",[30,264,265],{"class":32,"line":87},[30,266,267],{},"LunarFestivals.GetFestivalDate(2026, LunarFestival.MidAutumn);         \u002F\u002F 2026-09-25\n",[30,269,270],{"class":32,"line":94},[30,271,272],{},"LunarFestivals.GetFestivalDate(2026, LunarFestival.LunarNewYearEve);   \u002F\u002F 2026-02-16\n",[15,274,276],{"id":275},"semantics-worth-knowing","Semantics worth knowing",[278,279,280,287,294,304,310],"ul",{},[281,282,283,286],"li",{},[124,284,285],{},"All times are Taiwan time (UTC+8)","; no time-zone conversion",[281,288,289,290,293],{},"The default year boundary is the ",[124,291,292],{},"exact LiChun minute",": 2026-02-04 04:01 → 乙巳, 04:02 → 丙午",[281,295,296,299,300,303],{},[27,297,298],{},"GetDayGanzhi"," uses the civil date (switches at 00:00); ",[27,301,302],{},"GetFourPillars"," follows the Bazi 23:00 convention",[281,305,306,309],{},[124,307,308],{},"Leap months never count as festivals"," (a leap-5th-month 5th is not Dragon Boat)",[281,311,312],{},"Out-of-range queries (outside 1901-02-19 to 2100-12-31) always throw — the calendar is never extrapolated",[314,315,316],"style",{},"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);}html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}",{"title":25,"searchDepth":87,"depth":94,"links":318},[319,320,321,322,323,324],{"id":17,"depth":87,"text":18},{"id":71,"depth":87,"text":72},{"id":162,"depth":87,"text":163},{"id":191,"depth":87,"text":192},{"id":251,"depth":87,"text":252},{"id":275,"depth":87,"text":276},"md",{},"\u002Fen\u002Fgetting-started",{"title":6,"description":25},"en\u002Fgetting-started","vbmdUxIkCtTV9852hMoK_QPVhvEAiFh7AUIU_kMH-1Q",{"matched":332,"target":327,"all":333},"path()",null,1783231660621]