Skip to content

旬空干支空了报错 #49

@xuxiaokang7511

Description

@xuxiaokang7511
protected static int getXunIndex(String ganZhi) {
    int ganIndex = find(ganZhi.substring(0, 1), GAN, 0);
    int zhiIndex = find(ganZhi.substring(1), ZHI, 0);
    int diff = ganIndex - zhiIndex;
    if (diff < 0) {
        diff += 12;
    }

    return diff / 2;
}

public static String getXun(String ganZhi) {
    return XUN[getXunIndex(ganZhi)];
}

public static String getXunKong(String ganZhi) {
    return XUN_KONG[getXunIndex(ganZhi)];
}

int ganIndex = find(ganZhi.substring(0, 1), GAN, 0); ganZhi空了会报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions