Latest 0.0.1
Homepage https://github.com/wbitos/LunarTerm
License MIT
Platforms ios 8.0, requires ARC
Authors

LunarDate & SolarTerm

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);

Latest podspec

{
    "name": "LunarTerm",
    "version": "0.0.1",
    "summary": "LunarTerm is a converter for lunar.",
    "description": "LunarTerm is using to convert a solar date to lunar.",
    "homepage": "https://github.com/wbitos/LunarTerm",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "wbitos": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/wbitos/LunarTerm.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "Classes",
        "LunarTerm/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true
}

Pin It on Pinterest

Share This