level 1
绝情酷哥
楼主
package com.cucu.util;/** * 返回
正确的
年月日 * @author http://www.linewell.com [email protected] * @version 1.0 */public class Date { java.util.Date d = new java.util.Date(); int date; int month; int year; int hours; int minutes; int seconds; int day; /** * @return Returns the date. */ public int getDate() { return d.getDate(); } /** * @return Returns the month. */ public int getMonth() { return d.getMonth() + 1; } /** * @return Returns the year. */ public int getYear() { int y = d.getYear(); if (y < 1900) y += 1900; return y; } /** * @return Returns the hours. */ public int getHours() { return d.getHours(); } /** * @return Returns the minutes. */ public int getMinutes() { return d.getMinutes(); } /** * @return Returns the seconds. */ public int getSeconds() { return d.getSeconds(); } /** * @return Returns the day. */ public int getDay() { return d.getDay(); }}package com.cucu.util;/** * 日期,和时间帮助类 完成阳历到阴历的转换 * @author http://www.linewell.com [email protected] * @version 1.0 */public class CalendarHelper { private int calendarData[] = new int[20]; private int madd[] = new int[12]; private Date date = new Date();//调用Date时间类 private String tgString = "甲乙丙丁戊己庚辛壬癸";//天干表 private String dzString = "子丑寅卯辰巳午未申酉戌亥";//地支表 private String numString = "一二三四五六七八九十";//中文数字 private String monString = "正二三四五六七八九十冬腊";//阴历月份 private String weekString = "日一二三四五六";//中文星期 private String sx = "鼠牛虎兔龙蛇马羊猴鸡狗猪";//属相 private int cYear;//阴历年 private int cMonth;//阴历月 private int cDay;//阴历日 private int cHour;//阴历小时 private int year = date.getYear();//阳历年 private int month = date.getMonth();//阳历月 private int day = date.getDate();//阳历日 public CalendarHelper() { init(); } public CalendarHelper(int year, int month, int day) { this.year = year; this.month = month; this.day = day; init(); } /** * @return Returns the day. */ public int getDay() { return day; } /** * @param day The day to set. */ public void setDay(int day) { this.day = day; } /** * @return Returns the month. */ public int getMonth() { return month; } /** * @param month The month to set. */ public void setMonth(int month) { this.month = month; } /** * @return Returns the year. */ public int getYear() { return year; } /** * @param year The year to set. */ public void setYear(int year) { this.year = year; } /** * @return Returns the cDay. */ public int getCDay() {
2004年12月03日 13点12分
1
正确的
年月日 * @author http://www.linewell.com [email protected] * @version 1.0 */public class Date { java.util.Date d = new java.util.Date(); int date; int month; int year; int hours; int minutes; int seconds; int day; /** * @return Returns the date. */ public int getDate() { return d.getDate(); } /** * @return Returns the month. */ public int getMonth() { return d.getMonth() + 1; } /** * @return Returns the year. */ public int getYear() { int y = d.getYear(); if (y < 1900) y += 1900; return y; } /** * @return Returns the hours. */ public int getHours() { return d.getHours(); } /** * @return Returns the minutes. */ public int getMinutes() { return d.getMinutes(); } /** * @return Returns the seconds. */ public int getSeconds() { return d.getSeconds(); } /** * @return Returns the day. */ public int getDay() { return d.getDay(); }}package com.cucu.util;/** * 日期,和时间帮助类 完成阳历到阴历的转换 * @author http://www.linewell.com [email protected] * @version 1.0 */public class CalendarHelper { private int calendarData[] = new int[20]; private int madd[] = new int[12]; private Date date = new Date();//调用Date时间类 private String tgString = "甲乙丙丁戊己庚辛壬癸";//天干表 private String dzString = "子丑寅卯辰巳午未申酉戌亥";//地支表 private String numString = "一二三四五六七八九十";//中文数字 private String monString = "正二三四五六七八九十冬腊";//阴历月份 private String weekString = "日一二三四五六";//中文星期 private String sx = "鼠牛虎兔龙蛇马羊猴鸡狗猪";//属相 private int cYear;//阴历年 private int cMonth;//阴历月 private int cDay;//阴历日 private int cHour;//阴历小时 private int year = date.getYear();//阳历年 private int month = date.getMonth();//阳历月 private int day = date.getDate();//阳历日 public CalendarHelper() { init(); } public CalendarHelper(int year, int month, int day) { this.year = year; this.month = month; this.day = day; init(); } /** * @return Returns the day. */ public int getDay() { return day; } /** * @param day The day to set. */ public void setDay(int day) { this.day = day; } /** * @return Returns the month. */ public int getMonth() { return month; } /** * @param month The month to set. */ public void setMonth(int month) { this.month = month; } /** * @return Returns the year. */ public int getYear() { return year; } /** * @param year The year to set. */ public void setYear(int year) { this.year = year; } /** * @return Returns the cDay. */ public int getCDay() {