package com.jiuqi.njt.util; import java.util.Date; /** * <p>日期封装类</p> * * <p>Copyright: 版权所有 (c)<br> * Company: 久其</p> * * @author liyue * @version 2012-4-20 */ public class DateObj{ private String firstDay, lastDay, weekday; private Date currentDate; private int weekOfYear, month, day,year; public int getYear(){ return year; } public void setYear(int year){ this.year = year; } public String getWeekday(){ return weekday; } public void setWeekday(String weekday){ this.weekday = weekday; } public int getMonth(){ return month; } public void setMonth(int month){ this.month = month; } public int getDay(){ return day; } public void setDay(int day){ this.day = day; } /** * 得到封装的Date对象 * @return Date */ public Date getCurrentDate(){ return currentDate; } public void setCurrentDate(Date currentDate){ this.currentDate = currentDate; } /** * 当前周第一天是几月几号 * @return String */ public String getFirstDay(){ return firstDay; } public void setFirstDay(String firstDay){ this.firstDay = firstDay; } /** * 当前周最后一天是几月几号 * @return String */ public String getLastDay(){ return lastDay; } public void setLastDay(String lastDay){ this.lastDay = lastDay; } /** * 当前周是一年中的第几周 * @return int */ public int getWeekOfYear(){ return weekOfYear; } public void setWeekOfYear(int weekOfYear){ this.weekOfYear = weekOfYear; } @Override public String toString(){ return "DateObj [firstDay=" + firstDay + ", lastDay=" + lastDay + ", weekday=" + weekday + ", currentDate=" + currentDate + ", weekOfYear=" + weekOfYear + ", month=" + month + ", day=" + day + "]"; } }