快速业务通道

嶄忽滴煽麻隈java糞? - 園殻秘壇利

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-22

嶄忽滴煽麻隈java糞?

扮寂:2010-12-29

/**   * 嶄忽滴煽麻隈 - 糞喘噐巷煽 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();        String cmd = "day";        int y = 1901;        int m = 1;        int d = 1;        if (arg.length>0) cmd = arg[0];        if (arg.length>1) y = Integer.parseInt(arg[1]);        if (arg.length>2) m = Integer.parseInt(arg[2]);        if (arg.length>3) d = Integer.parseInt(arg[3]);        c.setGregorian(y,m,d);        c.computeChineseFields();        c.computeSolarTerms();        if (cmd.equalsIgnoreCase("year")) {           String[] t = c.getYearTable();           for (int i=0; i<t.length; i++) System.out.println(t[i]);        } else if (cmd.equalsIgnoreCase("month")) {           String[] t = c.getMonthTable();           for (int i=0; i<t.length; i++) System.out.println(t[i]);        } else {           System.out.println(c.toString());        }     }     public ChineseCalendarGB() {        setGregorian(1901,1,1);     }     public void setGregorian(int y, int m, int d) {        gregorianYear = y;        gregorianMonth = m;        gregorianDate = d;        isGregorianLeap = isGregorianLeapYear(y);        dayOfYear = dayOfYear(y,m,d);        dayOfWeek = dayOfWeek(y,m,d);        chineseYear = 0;    

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号