/*
|
* Copyright (C) 2016 huanghaibin_dev <huanghaibin_dev@163.com>
|
* WebSite https://github.com/MiracleTimes-Dev
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
* you may not use this file except in compliance with the License.
|
* You may obtain a copy of the License at
|
*
|
* http://www.apache.org/licenses/LICENSE-2.0
|
*
|
* Unless required by applicable law or agreed to in writing, software
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* See the License for the specific language governing permissions and
|
* limitations under the License.
|
*/
|
package com.haibin.oldcalendarview;
|
|
|
import java.io.Serializable;
|
|
/**
|
* 日历对象、
|
*/
|
@SuppressWarnings("all")
|
public class Calendar implements Serializable {
|
private int year;
|
private int month;
|
private int week;
|
private int day;
|
private boolean isCurrentMonth;//是否是本月
|
private boolean isCurrentDay;//是否是今天
|
private String lunar;//农历
|
private String scheme;//计划,可以用来标记当天是否有任务
|
private boolean schemeCompleted;
|
private int schemeColor;//各种自定义标记颜色、没有则选择默认颜色
|
private int completedSchemeColor;
|
private boolean highLightBackground;
|
private int highLightColor;
|
|
public int getYear() {
|
return year;
|
}
|
|
public void setYear(int year) {
|
this.year = year;
|
}
|
|
public int getMonth() {
|
return month;
|
}
|
|
public void setMonth(int month) {
|
this.month = month;
|
}
|
|
public int getWeek() {
|
return week;
|
}
|
|
public void setWeek(int week) {
|
this.week = week;
|
}
|
|
public int getDay() {
|
return day;
|
}
|
|
public void setDay(int day) {
|
this.day = day;
|
}
|
|
public boolean isCurrentMonth() {
|
return isCurrentMonth;
|
}
|
|
public void setCurrentMonth(boolean currentMonth) {
|
this.isCurrentMonth = currentMonth;
|
}
|
|
public boolean isCurrentDay() {
|
return isCurrentDay;
|
}
|
|
public void setCurrentDay(boolean currentDay) {
|
isCurrentDay = currentDay;
|
}
|
|
|
public String getLunar() {
|
return lunar;
|
}
|
|
public void setLunar(String lunar) {
|
this.lunar = lunar;
|
}
|
|
public String getScheme() {
|
return scheme;
|
}
|
|
public void setScheme(String scheme) {
|
this.scheme = scheme;
|
}
|
|
public boolean isSchemeCompleted() {
|
return schemeCompleted;
|
}
|
|
public void setSchemeCompleted(boolean schemeCompleted) {
|
this.schemeCompleted = schemeCompleted;
|
}
|
|
public int getSchemeColor() {
|
return schemeColor;
|
}
|
|
public void setSchemeColor(int schemeColor) {
|
this.schemeColor = schemeColor;
|
}
|
|
public int getCompletedSchemeColor() {
|
return completedSchemeColor;
|
}
|
|
public void setCompletedSchemeColor(int completedSchemeColor) {
|
this.completedSchemeColor = completedSchemeColor;
|
}
|
|
public int getHighLightColor() {
|
return highLightColor;
|
}
|
|
public void setHighLightColor(int highLightColor) {
|
this.highLightColor = highLightColor;
|
}
|
|
@Override
|
public boolean equals(Object o) {
|
if (o != null && o instanceof Calendar) {
|
if (((Calendar) o).getYear() == year && ((Calendar) o).getMonth() == month && ((Calendar) o).getDay() == day)
|
return true;
|
}
|
return super.equals(o);
|
}
|
|
@Override
|
public String toString() {
|
return year + "" + (month < 10 ? "0" + month : month) + "" + (day < 10 ? "0" + day : day);
|
}
|
|
public String getCurrentYearMonth() {
|
return year + "年" + (month < 10 ? "0" + month : month)+"月";
|
}
|
|
}
|