/
Day.java
67 lines (51 loc) · 1.29 KB
/
Day.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.shrikanthravi.collapsiblecalendarview.data;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by shrikanthravi on 06/03/18.
*/
public class Day implements Parcelable{
private int mYear;
private int mMonth;
private int mDay;
public Day(int year, int month, int day){
this.mYear = year;
this.mMonth = month;
this.mDay = day;
}
public int getMonth(){
return mMonth;
}
public int getYear(){
return mYear;
}
public int getDay(){
return mDay;
}
public Day(Parcel in){
int[] data = new int[3];
in.readIntArray(data);
this.mYear = data[0];
this.mMonth = data[1];
this.mYear = data[2];
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeIntArray(new int[] {this.mYear,
this.mMonth,
this.mDay});
}
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public Day createFromParcel(Parcel in) {
return new Day(in);
}
public Day[] newArray(int size) {
return new Day[size];
}
};
}