//
|
// Lunar.h
|
// animation
|
//
|
// Created by zhoujigang on 2021/3/16.
|
//
|
|
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
@class SolarUtil;
|
@class LunarUtil;
|
@class HolidayUtil;
|
@class DaYun;
|
@class EightChar;
|
@class Fu;
|
@class Holiday;
|
@class JieQi;
|
@class LiuNian;
|
@class LiuYue;
|
@class Lunar;
|
@class NineStar;
|
@class ShuJiu;
|
@class Solar;
|
@class SolarHalfYear;
|
@class SolarMonth;
|
@class SolarSeason;
|
@class SolarWeek;
|
@class SolarYear;
|
@class XiaoYun;
|
@class Yun;
|
|
|
/**
|
* 农历日期
|
*/
|
@interface Lunar : NSObject
|
|
//节气表头部追加农历上年末的节气名(节令:大雪),以示区分
|
@property (nonatomic, strong) NSString *JIE_QI_PREPEND;
|
|
//节气表尾部追加农历下年初的节气名(气令:冬至),以示区分
|
@property (nonatomic, strong) NSString *JIE_QI_APPEND;
|
|
//农历年初节气名(气令:冬至)
|
@property (nonatomic, strong) NSString *JIE_QI_FIRST;
|
|
//农历年末节气名(节令:大雪)
|
@property (nonatomic, strong) NSString *JIE_QI_LAST;
|
|
//节气表尾部追加阳历下年初的第一个节气名(节令:小寒),以示区分
|
@property (nonatomic, strong) NSString *JIE_APPEND_SOLAR_FIRST;
|
|
//节气表尾部追加阳历下年初的第二个节气名(气令:大寒),以示区分
|
@property (nonatomic, strong) NSString *QI_APPEND_SOLAR_SECOND;
|
|
// 阳历下年初的第一个节气名(节令:小寒)
|
@property (nonatomic, strong) NSString *JIE_SOLAR_FIRST;
|
|
//阳历下年初的第二个节气名(气令:大寒)
|
@property (nonatomic, strong) NSString *QI_SOLAR_SECOND;
|
|
//节气表,国标以冬至为首个节气
|
@property (nonatomic, strong) NSArray *JIE_QI;
|
|
@property (nonatomic, strong) NSArray *NUT_B;
|
@property (nonatomic, strong) NSArray *DT_AT;
|
@property (nonatomic, strong) NSArray *XL0;
|
@property (nonatomic, strong) NSArray *QI_KB;
|
@property (nonatomic, strong) NSString *QB;
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
//日
|
@property (nonatomic, assign, readonly) NSInteger day;
|
|
//时
|
@property (nonatomic, assign, readonly) NSInteger hour;
|
|
//分
|
@property (nonatomic, assign, readonly) NSInteger minute;
|
|
//秒
|
@property (nonatomic, assign, readonly) NSInteger second;
|
|
//对应阳历
|
@property (nonatomic, strong, readonly) Solar *solar;
|
|
//相对于基准日的偏移天数
|
@property (nonatomic, assign, readonly) NSInteger dayOffset;
|
|
//时对应的天干下标,0-9
|
@property (nonatomic, assign, readonly) NSInteger timeGanIndex;
|
|
//时对应的地支下标,0-11
|
@property (nonatomic, assign, readonly) NSInteger timeZhiIndex;
|
|
//日对应的天干下标,0-9
|
@property (nonatomic, assign, readonly) NSInteger dayGanIndex;
|
|
//日对应的天干下标(八字流派1,晚子时日柱算明天),0-9
|
@property (nonatomic, assign, readonly) NSInteger dayGanIndexExact;
|
|
//日对应的天干下标(八字流派2,晚子时日柱算当天),0-9
|
@property (nonatomic, assign, readonly) NSInteger dayGanIndexExact2;
|
|
//日对应的地支下标,0-11
|
@property (nonatomic, assign, readonly) NSInteger dayZhiIndex;
|
|
//日对应的地支下标(八字流派1,晚子时日柱算明天),0-9
|
@property (nonatomic, assign, readonly) NSInteger dayZhiIndexExact;
|
|
//日对应的地支下标(八字流派1,晚子时日柱算当天),0-9
|
@property (nonatomic, assign, readonly) NSInteger dayZhiIndexExact2;
|
|
//月对应的天干下标(以节交接当天起算),0-9
|
@property (nonatomic, assign, readonly) NSInteger monthGanIndex;
|
|
//月对应的地支下标(以节交接当天起算),0-11
|
@property (nonatomic, assign, readonly) NSInteger monthZhiIndex;
|
|
//月对应的天干下标(最精确的,供八字用,以节交接时刻起算),0-9
|
@property (nonatomic, assign, readonly) NSInteger monthGanIndexExact;
|
|
//月对应的地支下标(最精确的,供八字用,以节交接时刻起算),0-11
|
@property (nonatomic, assign, readonly) NSInteger monthZhiIndexExact;
|
|
//年对应的天干下标(国标,以正月初一为起点),0-9
|
@property (nonatomic, assign, readonly) NSInteger yearGanIndex;
|
|
//年对应的地支下标(国标,以正月初一为起点),0-11
|
@property (nonatomic, assign, readonly) NSInteger yearZhiIndex;
|
|
//年对应的天干下标(月干计算用,以立春为起点),0-9
|
@property (nonatomic, assign, readonly) NSInteger yearGanIndexByLiChun;
|
|
//年对应的地支下标(月支计算用,以立春为起点),0-11
|
@property (nonatomic, assign, readonly) NSInteger yearZhiIndexByLiChun;
|
|
//年对应的天干下标(最精确的,供八字用,以立春交接时刻为起点),0-9
|
@property (nonatomic, assign, readonly) NSInteger yearGanIndexExact;
|
|
//年对应的地支下标(最精确的,供八字用,以立春交接时刻为起点),0-11
|
@property (nonatomic, assign, readonly) NSInteger yearZhiIndexExact;
|
|
//星期下标(0-6),0代表周日,1代表周一
|
@property (nonatomic, assign, readonly) NSInteger weekIndex;
|
|
//24节气表(对应阳历的准确时刻)
|
@property (nonatomic, strong, readonly) NSMutableDictionary<NSString *, Solar *> *jieQi;
|
|
//八字
|
@property (nonatomic, strong, readonly) EightChar *eightChar;
|
|
+ (instancetype)share;
|
|
@end
|
|
/**
|
* 阳历工具,基准日期为1901年1月1日,对应农历1900年十一月十一
|
*/
|
@interface SolarUtil : NSObject
|
|
//阳历基准年
|
@property (nonatomic, assign) NSInteger BASE_YEAR;
|
|
//阳历基准月
|
@property (nonatomic, assign) NSInteger BASE_MONTH;
|
|
//阳历基准日
|
@property (nonatomic, assign) NSInteger BASE_DAY;
|
|
//星期
|
@property (nonatomic, strong) NSArray *WEEK;
|
|
//每月天数
|
@property (nonatomic, strong) NSArray *DAYS_OF_MONTH;
|
|
//星座
|
@property (nonatomic, strong) NSArray *XING_ZUO;
|
|
//日期对应的节日
|
@property (nonatomic, strong) NSDictionary* FESTIVAL;
|
|
//几月第几个星期几对应的节日
|
@property (nonatomic, strong) NSDictionary* WEEK_FESTIVAL;
|
|
//日期对应的非正式节日
|
@property (nonatomic, strong) NSDictionary<NSString *, NSArray *>* OTHER_FESTIVAL;
|
|
+ (instancetype)share;
|
|
+ (BOOL)isLeapYear:(NSInteger)year;
|
|
+ (NSInteger)getDaysOfMonth:(NSInteger)year :(NSInteger)month;
|
|
+ (NSInteger)getWeeksOfMonth:(NSInteger)year :(NSInteger)month :(NSInteger)start;
|
|
@end
|
|
/**
|
* 农历工具,基准日期为1900年十一月十一,对应阳历1901年1月1日,最远仅支持到2099年
|
*/
|
@interface LunarUtil : NSObject
|
|
@property (nonatomic, assign) NSInteger BASE_YEAR;
|
@property (nonatomic, assign) NSInteger BASE_MONTH;
|
@property (nonatomic, assign) NSInteger BASE_DAY;
|
@property (nonatomic, assign) NSInteger BASE_INDEX;
|
@property (nonatomic, assign) NSInteger BASE_YEAR_JIU_XING_INDEX;
|
@property (nonatomic, assign) NSInteger BASE_YEAR_GAN_ZHI_INDEX;
|
@property (nonatomic, assign) NSInteger BASE_DAY_GAN_ZHI_INDEX;
|
@property (nonatomic, assign) NSInteger BASE_MONTH_ZHI_INDEX;
|
@property (nonatomic, assign) NSInteger BASE_WEEK_INDEX;
|
|
@property (nonatomic, strong) NSArray *LEAP_MONTH_YEAR;
|
@property (nonatomic, strong) NSArray *LUNAR_MONTH;
|
@property (nonatomic, strong) NSArray *XUN;
|
@property (nonatomic, strong) NSArray *XUN_KONG;
|
@property (nonatomic, strong) NSArray *LIU_YAO;
|
@property (nonatomic, strong) NSArray *WU_HOU;
|
@property (nonatomic, strong) NSArray *GAN;
|
@property (nonatomic, strong) NSArray *POSITION_XI;
|
@property (nonatomic, strong) NSArray *POSITION_YANG_GUI;
|
@property (nonatomic, strong) NSArray *POSITION_YIN_GUI;
|
@property (nonatomic, strong) NSArray *POSITION_FU;
|
@property (nonatomic, strong) NSArray *POSITION_CAI;
|
|
@property (nonatomic, strong) NSArray *POSITION_TAI_DAY;
|
@property (nonatomic, strong) NSArray *POSITION_TAI_MONTH;
|
@property (nonatomic, strong) NSArray *ZHI;
|
@property (nonatomic, strong) NSArray *JIA_ZI;
|
@property (nonatomic, strong) NSArray *ZHI_XING;
|
@property (nonatomic, strong) NSArray *TIAN_SHEN;
|
@property (nonatomic, strong) NSArray *YI_JI;
|
|
@property (nonatomic, strong) NSString *DAY_YI_JI;
|
@property (nonatomic, strong) NSString *TIME_YI_JI;
|
|
@property (nonatomic, strong) NSArray *SHEN_SHA;
|
|
@property (nonatomic, strong) NSString *DAY_SHEN_SHA;
|
|
@property (nonatomic, strong) NSDictionary *ZHI_TIAN_SHEN_OFFSET;// 月份地支对应天神偏移下标
|
@property (nonatomic, strong) NSDictionary *TIAN_SHEN_TYPE;// 天神类型:黄道,黑道
|
@property (nonatomic, strong) NSDictionary *TIAN_SHEN_TYPE_LUCK;// 天神类型吉凶
|
@property (nonatomic, strong) NSArray *PENG_ZU_GAN;
|
@property (nonatomic, strong) NSArray *PENG_ZU_ZHI;
|
@property (nonatomic, strong) NSArray *NUMBER;
|
@property (nonatomic, strong) NSArray *MONTH;
|
|
@property (nonatomic, strong) NSArray *SEASON;
|
@property (nonatomic, strong) NSArray *SHENG_XIAO;
|
@property (nonatomic, strong) NSArray *QI;
|
@property (nonatomic, strong) NSArray *JIE;
|
@property (nonatomic, strong) NSArray *DAY;
|
@property (nonatomic, strong) NSArray *YUE_XIANG;
|
|
@property (nonatomic, strong) NSDictionary *FESTIVAL;//农历日期对应的节日
|
|
@property (nonatomic, strong) NSDictionary *OTHER_FESTIVAL;//农历日期对应的非正式节日
|
|
|
@property (nonatomic, strong) NSDictionary *XIU;// 28星宿对照表,地支+星期
|
@property (nonatomic, strong) NSDictionary *XIU_LUCK;// 星宿对应吉凶
|
@property (nonatomic, strong) NSDictionary *XIU_SONG;// 星宿歌
|
@property (nonatomic, strong) NSDictionary *SHOU;// 兽
|
// 地支相冲(子午相冲,丑未相冲,寅申相冲,辰戌相冲,卯酉相冲,巳亥相冲),由于地支对应十二生肖,也就对应了生肖相冲
|
@property (nonatomic, strong) NSArray *CHONG;
|
@property (nonatomic, strong) NSArray *CHONG_GAN;// 天干相冲之无情之克(阳克阳,阴克阴)
|
@property (nonatomic, strong) NSDictionary *CHONG_GAN_BAD;
|
@property (nonatomic, strong) NSArray *CHONG_GAN_TIE;// 天干相冲之有情之克(阳克阴,阴克阳)
|
@property (nonatomic, strong) NSDictionary *CHONG_GAN_TIE_GOOD;// 天干五合(有情之克中最有情的5个)
|
@property (nonatomic, strong) NSDictionary *SHA;// 煞
|
@property (nonatomic, strong) NSDictionary *POSITION_DESC;// 方位描述
|
@property (nonatomic, strong) NSDictionary *GONG;// 宫
|
@property (nonatomic, strong) NSDictionary *ZHENG;// 政
|
@property (nonatomic, strong) NSDictionary *ANIMAL;// 动物
|
@property (nonatomic, strong) NSDictionary *WU_XING_GAN;// 天干五行
|
@property (nonatomic, strong) NSDictionary *WU_XING_ZHI;// 地支五行
|
@property (nonatomic, strong) NSDictionary *NAYIN;// 纳音
|
@property (nonatomic, strong) NSDictionary *SHI_SHEN_GAN;// 天干十神,日主+天干为键
|
@property (nonatomic, strong) NSDictionary *SHI_SHEN_ZHI;// 地支十神,日主+地支藏干主气为键
|
@property (nonatomic, strong) NSDictionary *ZHI_HIDE_GAN;// 地支藏干表,分别为主气、余气、杂气
|
|
+ (instancetype)share;
|
|
+ (NSInteger)getDaysOfMonth:(NSInteger)year :(NSInteger)month;
|
+ (NSInteger)getLeapMonth:(NSInteger)year;
|
+ (NSInteger)nextMonth:(NSInteger)y :(NSInteger)m;
|
+ (NSInteger)computeAddDays:(NSInteger)year :(NSInteger)month :(NSInteger)day;
|
+ (NSInteger)getTimeZhiIndex:(NSString *)hm;
|
+ (NSString *)convertTime:(NSString *)hm;
|
|
+ (NSArray *)getDayYi:(NSString *)monthGanZhi :(NSString *)dayGanZhi;
|
+ (NSArray *)getDayJi:(NSString *)monthGanZhi :(NSString *)dayGanZhi;
|
|
+ (NSArray *)getDayJiShen:(NSInteger)lunarMonth :(NSString *)dayGanZhi;
|
+ (NSArray *)getDayXiongSha:(NSInteger)lunarMonth :(NSString *)dayGanZhi;
|
|
+ (NSArray *)getTimeYi:(NSString *)dayGanZhi :(NSString *)timeGanZhi;
|
+ (NSArray *)getTimeJi:(NSString *)dayGanZhi :(NSString *)timeGanZhi;
|
|
+ (NSInteger)getXunIndex:(NSString *)ganZhi;
|
+ (NSString *)getXun:(NSString *)ganZhi;
|
+ (NSString *)getXunKong:(NSString *)ganZhi;
|
|
+ (NSInteger)getJiaZiIndex:(NSString *)ganZhi;
|
|
@end
|
|
/**
|
* 节假日
|
*/
|
@interface Holiday : NSObject
|
|
//日期,YYYY-MM-DD格式
|
@property (nonatomic, strong, readonly) NSString *day;
|
|
//名称,如:国庆
|
@property (nonatomic, strong, readonly) NSString *name;
|
|
//是否调休,即是否要上班
|
@property (nonatomic, assign, readonly) BOOL work;
|
|
//关联的节日,YYYY-MM-DD格式
|
@property (nonatomic, strong, readonly) NSString *target;
|
|
- (instancetype)initWith:(NSString *)day :(NSString *)name :(BOOL)word :(NSString *)target;
|
|
@end
|
|
/**
|
* 法定节假日工具(自2001年12月29日起)
|
*/
|
@interface HolidayUtil : NSObject
|
|
//数据段长度:18
|
@property (nonatomic, assign) NSInteger SIZE;
|
|
@property (nonatomic, assign) NSInteger ZERO;
|
|
//节假日名称(元旦0,春节1,清明2,劳动3,端午4,中秋5,国庆6,国庆中秋7,抗战胜利日8)
|
@property (nonatomic, strong) NSArray *NAMES;
|
|
//节假日数据,日期YYYYMMDD+名称下标(1位)+是否调休(1位)+对应节日YYYYMMDD
|
@property (nonatomic, strong) NSString *DATA;
|
|
+ (instancetype)share;
|
|
/**
|
* 获取指定年月日的节假日信息,如果不存在,返回null
|
* @param year 年
|
* @param month 月,1-12
|
* @param day 日,1-31
|
* @return Holiday|null
|
*/
|
+ (Holiday *)getHolidayByYmd:(NSInteger)year :(NSInteger)month :(NSInteger)day;
|
|
/**
|
* 获取指定年月日的节假日信息,如果不存在,返回null
|
* @param ymd 年月日
|
* @return Holiday|null
|
*/
|
+ (Holiday *)getHoliday:(NSString *)ymd;
|
|
/**
|
* 获取指定年月的节假日列表
|
* @param year 年
|
* @param month 月,1-12
|
* @return array
|
*/
|
+ (NSArray *)getHolidaysByYm:(NSInteger)year :(NSInteger)month;
|
|
/**
|
* 获取指定年的节假日列表
|
* @param year 年
|
* @return array
|
*/
|
+ (NSArray *)getHolidaysByYear:(NSInteger)year;
|
|
/**
|
* 获取指定年月日的节假日列表
|
* @param ymd 年、年月、年月日
|
* @return array 节假日列表
|
*/
|
+ (NSArray *)getHolidays:(NSString *)ymd;
|
|
/**
|
* 获取指定节日(仅节日当天)的相关节假日列表
|
* @param year 年
|
* @param month 月,1-12
|
* @param day 日,1-31
|
* @return array
|
*/
|
+ (NSArray *)getHolidaysByTargetYmd:(NSInteger)year :(NSInteger)month :(NSInteger)day;
|
|
/**
|
* 获取指定节日(仅节日当天)的相关节假日列表
|
* @param ymd 年月日
|
* @return array
|
*/
|
+ (NSArray *)getHolidaysByTarget:(NSString *)ymd;
|
|
/**
|
* 修正或追加节假日数据。节假日名称下标从0开始,超过9的,按ASCII码表依次往后排列;调休标识0为上班,否则放假
|
* @param names 用于替换默认的节假日名称列表,传null即可使用默认名称
|
* @param data 需要修正或追加的节假日数据,每18位表示1天依次排列,格式:当天年月日YYYYMMDD(8位)+节假日名称下标(1位)+调休标识(1位)+节假日当天YYYYMMDD(8位)。例:202005023120200501代表2020-05-02为劳动节放假,对应节假日为2020-05-01
|
*/
|
- (void)fix:(NSArray *_Nullable)names :(NSString *)data;
|
|
@end
|
|
|
/**
|
* 大运
|
*/
|
@interface DaYun : NSObject
|
|
//开始年(含)
|
@property (nonatomic, assign, readonly) NSInteger startYear;
|
|
//结束年(含)
|
@property (nonatomic, assign, readonly) NSInteger endYear;
|
|
//开始年龄(含)
|
@property (nonatomic, assign, readonly) NSInteger startAge;
|
|
//结束年龄(含)
|
@property (nonatomic, assign, readonly) NSInteger endAge;
|
|
//序数,0-9
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
//运
|
@property (nonatomic, strong, readonly) Yun *yun;
|
|
//阴历
|
@property (nonatomic, strong, readonly) Lunar *lunar;
|
|
@end
|
|
|
/**
|
* 八字
|
*/
|
@interface EightChar : NSObject
|
|
@property (nonatomic, assign, readonly) NSInteger sect;
|
@property (nonatomic, strong, readonly) Lunar *lunar;
|
|
@property (nonatomic, strong) NSDictionary *CHANG_SHENG_OFFSET;
|
@property (nonatomic, strong) NSArray *MONTH_ZHI;
|
@property (nonatomic, strong) NSArray *CHANG_SHENG;
|
|
+ (instancetype)share;
|
|
+ (instancetype)fromLunar:(Lunar *)lunar;
|
|
- (NSString *)getYear;
|
- (NSString *)getMonth;
|
- (NSString *)getDay;
|
- (NSString *)getTime;
|
|
- (NSString *)getYearWuXing;
|
- (NSString *)getMonthWuXing;
|
- (NSString *)getDayWuXing;
|
- (NSString *)getTimeWuXing;
|
|
- (NSString *)getYearNaYin;
|
- (NSString *)getMonthNaYin;
|
- (NSString *)getDayNaYin;
|
- (NSString *)getTimeNaYin;
|
|
- (NSString *)getYearShiShenGan;
|
- (NSString *)getMonthShiShenGan;
|
- (NSString *)getDayShiShenGan;
|
- (NSString *)getTimeShiShenGan;
|
|
- (NSArray *)getYearShiShenZhi;
|
- (NSArray *)getMonthShiShenZhi;
|
- (NSArray *)getDayShiShenZhi;
|
- (NSArray *)getTimeShiShenZhi;
|
|
@end
|
|
|
/**
|
* 三伏
|
* 从夏至后第3个庚日算起,初伏为10天,中伏为10天或20天,末伏为10天。当夏至与立秋之间出现4个庚日时中伏为10天,出现5个庚日则为20天。
|
*
|
* @package com\nlf\calendar
|
*/
|
@interface Fu : NSObject
|
|
//名称,如:初伏、中伏、末伏
|
@property (nonatomic, strong, readonly) NSString *name;
|
//当前入伏第几天,1-20
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
- (instancetype)initWith:(NSString *)name :(NSInteger)index;
|
|
|
@end
|
|
|
/**
|
* 节气
|
*/
|
@interface JieQi : NSObject
|
|
// 名称
|
@property (nonatomic, strong, readonly) NSString *name;
|
// 阳历日期
|
@property (nonatomic, strong, readonly) Solar *solar;
|
// 是否节令
|
@property (nonatomic, assign, readonly) BOOL jie;
|
// 是否气令
|
@property (nonatomic, assign, readonly) BOOL qi;
|
|
- (instancetype)initWith:(NSString *)name :(Solar *)solar;
|
|
@end
|
|
|
/**
|
* 流年
|
*/
|
@interface LiuNian : NSObject
|
|
//序数,0-9
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
//大运
|
@property (nonatomic, strong, readonly) DaYun *daYun;
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//年龄
|
@property (nonatomic, assign, readonly) NSInteger age;
|
|
//阴历
|
@property (nonatomic, strong, readonly) Lunar *lunar;
|
|
- (instancetype)initWith:(DaYun *)daYun :(NSInteger)index;
|
|
@end
|
|
|
/**
|
* 流月
|
*/
|
@interface LiuYue : NSObject
|
|
//序数,0-9
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
// 流年
|
@property (nonatomic, strong, readonly) LiuNian *liuNian;
|
|
- (instancetype)initWith:(LiuNian *)liuNian :(NSInteger)index;
|
|
@end
|
|
|
/**
|
* 九星
|
*/
|
@interface NineStar : NSObject
|
|
//序号
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
@property (nonatomic, strong) NSArray *NUMBER;//九数
|
@property (nonatomic, strong) NSArray *COLOR;//七色
|
@property (nonatomic, strong) NSArray *WU_XING;//五行
|
@property (nonatomic, strong) NSArray *POSITION;//后天八卦方位
|
@property (nonatomic, strong) NSArray *NAME_BEI_DOU;//北斗九星
|
@property (nonatomic, strong) NSArray *NAME_XUAN_KONG;//玄空九星(玄空风水)
|
@property (nonatomic, strong) NSArray *NAME_QI_MEN;//奇门九星(奇门遁甲,也称天盘九星)
|
@property (nonatomic, strong) NSArray *BA_MEN_QI_MEN;//八门(奇门遁甲)
|
@property (nonatomic, strong) NSArray *NAME_TAI_YI;//太乙九神(太乙神数)
|
@property (nonatomic, strong) NSArray *TYPE_TAI_YI;//太乙九神对应类型
|
@property (nonatomic, strong) NSArray *SONG_TAI_YI;//太乙九神歌诀(太乙神数)
|
@property (nonatomic, strong) NSArray *LUCK_XUAN_KONG;//吉凶(玄空风水)
|
@property (nonatomic, strong) NSArray *LUCK_QI_MEN;//吉凶(奇门遁甲)
|
@property (nonatomic, strong) NSArray *YIN_YANG_QI_MEN;//阴阳(奇门遁甲)
|
|
+ (instancetype)share;
|
|
- (instancetype)initWith:(NSInteger)index;
|
|
|
@end
|
|
|
/**
|
* 数九
|
*/
|
@interface ShuJiu : NSObject
|
|
//名称,如:一九、二九
|
@property (nonatomic, strong, readonly) NSString *name;
|
|
//当前数九第几天,1-9
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
- (instancetype)initWith:(NSString *)name :(NSInteger)index;
|
|
@end
|
|
|
/**
|
* 阳历日期
|
*/
|
@interface Solar : NSObject
|
|
//2000年儒略日数(2000-1-1 12:00:00 UTC) //2451545
|
@property (nonatomic, assign) NSInteger J2000;
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
//日
|
@property (nonatomic, assign, readonly) NSInteger day;
|
|
//时
|
@property (nonatomic, assign, readonly) NSInteger hour;
|
|
//分
|
@property (nonatomic, assign, readonly) NSInteger minute;
|
|
//秒
|
@property (nonatomic, assign, readonly) NSInteger second;
|
|
//日期
|
@property (nonatomic, assign, readonly) NSDate *calendar;
|
|
+ (instancetype)share;
|
|
+ (instancetype)fromDate:(NSDate *)date;
|
|
+ (instancetype)fromJulianDay:(CGFloat)julianDay;
|
|
- (NSString *)toYmd;
|
|
- (NSString *)toYmdHms;
|
|
- (Lunar *)getLunar;
|
|
@end
|
|
|
/**
|
* 阳历半年
|
*/
|
@interface SolarHalfYear : NSObject
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
//一个半年的月数
|
@property (nonatomic, assign) NSInteger MONTH_COUNT;
|
|
+ (instancetype)share;
|
|
|
@end
|
|
|
/**
|
* 阳历月
|
*/
|
@interface SolarMonth : NSObject
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
|
|
@end
|
|
|
/**
|
* 阳历季度
|
*/
|
@interface SolarSeason : NSObject
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
//一个半年的月数
|
@property (nonatomic, assign) NSInteger MONTH_COUNT;
|
|
+ (instancetype)share;
|
|
@end
|
|
|
/**
|
* 阳历周
|
*/
|
@interface SolarWeek : NSObject
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//月
|
@property (nonatomic, assign, readonly) NSInteger month;
|
|
//日
|
@property (nonatomic, assign, readonly) NSInteger day;
|
|
//星期几作为一周的开始,1234560分别代表星期一至星期天
|
@property (nonatomic, assign, readonly) NSInteger start;
|
|
|
@end
|
|
|
/**
|
* 阳历年
|
*/
|
@interface SolarYear : NSObject
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//一年的月数
|
@property (nonatomic, assign) NSInteger MONTH_COUNT;
|
|
+ (instancetype)share;
|
|
@end
|
|
|
/**
|
* 小运
|
*/
|
@interface XiaoYun : NSObject
|
|
//序数,0-9
|
@property (nonatomic, assign, readonly) NSInteger index;
|
|
//大运
|
@property (nonatomic, strong, readonly) DaYun *daYun;
|
|
//年
|
@property (nonatomic, assign, readonly) NSInteger year;
|
|
//年龄
|
@property (nonatomic, assign, readonly) NSInteger age;
|
|
//阴历
|
@property (nonatomic, strong, readonly) Lunar *lunar;
|
|
//是否顺推
|
@property (nonatomic, assign, readonly) BOOL forward;
|
|
- (instancetype)initWith:(DaYun *)daYun :(NSInteger)index :(BOOL)forward;
|
|
@end
|
|
/**
|
* 运
|
*/
|
@interface Yun : NSObject
|
|
//性别,1男,0女
|
@property (nonatomic, assign, readonly) NSInteger gender;
|
|
//起运年数
|
@property (nonatomic, assign, readonly) NSInteger startYear;
|
|
//起运月数
|
@property (nonatomic, assign, readonly) NSInteger startMonth;
|
|
//起运天数
|
@property (nonatomic, assign, readonly) NSInteger startDay;
|
|
//是否顺推
|
@property (nonatomic, assign, readonly) BOOL forward;
|
|
//阴历日期
|
@property (nonatomic, strong, readonly) Lunar *lunar;
|
|
- (Solar *)getStartSolar;
|
|
@end
|
|
|
NS_ASSUME_NONNULL_END
|