Use lunar calendar input for birth date with solar conversion display.

Add LunarBirthPicker for bazi and combined forms, converting lunar input to solar for chart calculation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-13 09:06:37 +08:00
parent 1cde9ffc9c
commit abf78cbbb5
5 changed files with 250 additions and 10 deletions
+17
View File
@@ -1,5 +1,10 @@
declare module "lunar-javascript" {
export class Solar {
static fromYmd(
year: number,
month: number,
day: number,
): Solar;
static fromYmdHms(
year: number,
month: number,
@@ -8,12 +13,24 @@ declare module "lunar-javascript" {
minute: number,
second: number,
): Solar;
static fromDate(date: Date): Solar;
getLunar(): Lunar;
getWeek(): number;
toYmd(): string;
toYmdHms(): string;
toFullString(): string;
}
export class Lunar {
static fromYmd(
year: number,
month: number,
day: number,
): Lunar;
getSolar(): Solar;
getYear(): number;
getMonth(): number;
getDay(): number;
getEightChar(): EightChar;
getDayInGanZhi(): string;
getTimeInGanZhi(): string;