美文网首页
iOS根据月日计算星座

iOS根据月日计算星座

作者: Nest0912 | 来源:发表于2017-10-16 18:16 被阅读0次

iOS根据月日计算星座

  • (NSString *)getConstellationWithMonth:(int)m_ day:(int)d_
    {
    NSString * astroString = @"摩羯座水瓶座双鱼座白羊座金牛座双子座巨蟹座狮子座处女座天秤座天蝎座射手座摩羯座";
    NSString * astroFormat = @"102123444543";
    NSString * result;

    result = [NSString stringWithFormat:@"%@",[astroString substringWithRange:NSMakeRange(m_3-(d_ < [[astroFormat substringWithRange:NSMakeRange((m_-1), 1)] intValue] - (-19))3, 3)]];

    return result;
    }

相关文章

网友评论

      本文标题:iOS根据月日计算星座

      本文链接:https://www.haomeiwen.com/subject/tfrluxtx.html