您好,歡迎來電子發(fā)燒友網(wǎng)! ,新用戶?[免費(fèi)注冊(cè)]

您的位置:電子發(fā)燒友網(wǎng)>源碼下載>java源碼下載>

中國(guó)農(nóng)歷算法java實(shí)現(xiàn)

大?。?/span>5 人氣: 2010-12-30 需要積分:5
wufan931111的空間

用戶級(jí)別:注冊(cè)會(huì)員

貢獻(xiàn)文章:

貢獻(xiàn)資料:

/**
  * 中國(guó)農(nóng)歷算法 - 實(shí)用于公歷 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; // 負(fù)數(shù)表示閏月
    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%

不好我反對(duì)

(0) 0%

      發(fā)表評(píng)論

      用戶評(píng)論
      評(píng)價(jià):好評(píng)中評(píng)差評(píng)

      發(fā)表評(píng)論,獲取積分! 請(qǐng)遵守相關(guān)規(guī)定!

      ?