农历公历生日转换器

农历公历生日转换器可以帮助您将农历生日转换为公历生日。

以下是一个简单的农历公历生日转换器示例:。

```python。

from datetime import datetime, timedelta。

def convert_to_full_year(birth_date):。

return (birth_date.year - 1911) % 400 + 1911。

def convert_to_birth_year(birth_date):。

return birth_date.year - 1911。

def convert_to_lunar_year(birth_date):。

return birth_date.month - 1 + 12。

def convert_to_year_with_lunar_calendar(birth_date):。

year = convert_to_full_year(birth_date)。

if (year % 12) == 0:。

year += 1。

return year。

def convert_to_birth_date_with_lunar_calendar(birth_date):。

year = convert_to_year_with_lunar_calendar(birth_date)。

birth_month = birth_date.month + 1。

return (year, birth_month, birth_date.day)。

def convert_to_lunar_birth_date(birth_date):。

year, birth_month, birth_day = convert_to_birth_date_with_lunar_calendar(birth_date)。

return birth_day + birth_month + 1911。

def convert_to_full_birth_date(birth_date):。

year = convert_to_full_year(birth_date)。

birth_month = birth_date.month - 1 + 12。

return (year, birth_month, birth_day)。

def convert_to_birth_date(birth_date):。

year = convert_to_year_with_lunar_calendar(birth_date)。

birth_month = birth_date.month + 1。

return birth_month + 1911。

birth_date = datetime.strptime('1990/02/19', "%Y/%m/%d")。

result = convert_to_full_birth_date(birth_date)。

print(result)。

```。

这个示例将输入的出生日期(农历)转换为公历生日。

农历 七月

您可能还会喜欢:
生日八字转换器
出生日期生辰八字转换器
星座日期农历阳历转换
出生日期转换生辰八字
出生日期转换生辰八字五行
出生日期转换生辰八字在线
出生日期转换生辰八字口诀
出生日期转换生辰八字怎么算五行
出生日期转换生辰八字对照表
星座按公历还是农历生日
星座按农历还是公历生日
星座看公历还是农历生日
星座的生日是公历还是农历
星座看什么农历还是公历生日
生日是什么星座看公历还是农历