农历公历生日转换器可以帮助您将农历日期转换为公历日期。
以下是一个简单的农历公历生日转换器,您可以将其复制到文本编辑器中,然后保存为Excel或CSV文件,以便在需要时使用。
```。
import datetime。
def convert_to_full_name(birth_date):。
year, month, day = birth_date.split('')。
return f"{year}年{month}月{day}"。
def convert_to_birth_year(birth_date):。
year, month, day = birth_date.split('')。
return int(year)。
def convert_to_birth_month(birth_date):。
year, month, day = birth_date.split('')。
return int(month)。
def convert_to_birth_day(birth_date):。
year, month, day = birth_date.split('')。
return int(day)。
def convert_to_full_birth_date(birth_date):。
year = convert_to_birth_year(birth_date)。
month = convert_to_birth_month(birth_date)。
day = convert_to_birth_day(birth_date)。
return f"{year}年{month}月{day}"。
birth_date = "出生于1990年5月22日"。
output_date = convert_to_full_birth_date(birth_date)。
print(output_date)。
```。
这个转换器可以接受三个参数:出生日期,例如"出生于1990年5月22日"。它将返回一个公历日期,格式为"YYYY年MM月DD"。您可以将此代码保存为Excel或CSV文件,并从文件中读取出生日期以进行转换。
您可能还会喜欢:
生日八字转换器
出生日期生辰八字转换器
星座日期农历阳历转换
出生日期转换生辰八字
出生日期转换生辰八字五行
出生日期转换生辰八字在线
出生日期转换生辰八字口诀
出生日期转换生辰八字怎么算五行
出生日期转换生辰八字对照表
星座按公历还是农历生日
星座按农历还是公历生日
星座看公历还是农历生日
星座的生日是公历还是农历
星座看什么农历还是公历生日
生日是什么星座看公历还是农历