×

中国农历算法java实现

消耗积分:5 | 格式:rar | 大小:5 | 2010-12-30

370217

分享资料个

/**
  * 中国农历算法 - 实用于公历 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();

 

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !