LunarTerm 0.0.1

LunarTerm 0.0.1

测试已测试
语言语言 Objective-CObjective C
许可证 MIT
发布最后发布2017年2月

wbitos维护。



LunarTerm 0.0.1

  • 作者:
  • wbitos

农历日期 & 二十四节气

LunarTerm 是一个公农历转换工具,可以方便地进行公农历转换。

公历转农历

LunarDate *lDate = [LunarDate lunarDateWithSolarDate:(LTDate){2017, 2, 3}];
NSLog(@"%@", lDate);

农历转公历

LunarDate *lDate = [LunarDate lunarDateWithYear:2017 month:1 day:1 leap:YES];
NSLog(@"%@ -> %d-%d-%d", lDate, (int)lDate.solarDate.year, (int)lDate.solarDate.month, (int)lDate.solarDate.day);

二十四节气

NSInteger day = [SolarTerm getDayForTerm:2017 indexAtTermArray:LiChun];
NSLog(@"%d", (int)day);