您好,欢迎来电子发烧友网! ,新用户?[免费注册]

您的位置:电子发烧友网>源码下载>java源码下载>

中国农历算法java实现

大小:5 人气: 2010-12-30 需要积分:5
wufan931111的空间

用户级别:注册会员

贡献文章:

贡献资料:

/**
  * 中国农历算法 - 实用于公历 1901 年至 2100 年之间的 200 年
  */
import java.text.*;
import java.util.*;
class ChineseCalendarGB {
    private int gregorianYear;
    private int gregorianMonth;
    private int gregorianDate;
    private boolean isGregorianLeap;
    private int dayOfYear;
    private int dayOfWeek; // 周日一星期的第一天
    private int chineseYear;
    private int chineseMonth; // 负数表示闰月
    private int chineseDate;
    private int sectionalTerm;
    private int principleTerm;
    private static char[] daysInGregorianMonth =
       {31,28,31,30,31,30,31,31,30,31,30,31};
    private static String[] stemNames =
       {"甲","乙","丙","丁","戊","己","庚","辛","壬","癸"};
    private static String[] branchNames =
       {"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
    private static String[] animalNames =
       {"鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"};
    public static void main(String[] arg) {
       ChineseCalendarGB c = new ChineseCalendarGB();

 

非常好我支持^.^

(1) 100%

不好我反对

(0) 0%

      发表评论

      用户评论
      评价:好评中评差评

      发表评论,获取积分! 请遵守相关规定!