litesoft
Diff Revisions
911
vs
912
for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/CalendarYM.java
|
@@ -8,34 +8,19 @@ |
8 |
8 |
|
* Note: This class supports Gregorian dates only and has no concept of time or TimeZones. As such when working with |
9 |
9 |
|
* Java Util Date(s) (or it's descendants) the local (or "Wall") date is all that is considered! |
10 |
10 |
|
*/ |
11 |
|
- |
@SuppressWarnings("UnusedDeclaration") |
12 |
11 |
|
public final class CalendarYM extends AbstractCalendarYM<CalendarYM, AbstractCalendarYM.Mutable> implements SQLdateable |
13 |
12 |
|
{ |
14 |
13 |
|
private static final long serialVersionUID = 1L; |
15 |
14 |
|
|
16 |
|
- |
private int mYear, mMonth; |
17 |
|
- |
|
18 |
|
- |
@Override |
19 |
|
- |
public int getYear() |
20 |
|
- |
{ |
21 |
|
- |
return mYear; |
22 |
|
- |
} |
23 |
|
- |
|
24 |
|
- |
@Override |
25 |
|
- |
public int getMonth() |
|
15 |
+ |
@SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */ |
|
16 |
+ |
protected CalendarYM() |
26 |
17 |
|
{ |
27 |
|
- |
return mMonth; |
|
18 |
+ |
super( 0, 1 ); |
28 |
19 |
|
} |
29 |
20 |
|
|
30 |
21 |
|
public CalendarYM( int pYear, int pMonth ) |
31 |
22 |
|
{ |
32 |
|
- |
mMonth = validateMonth( mYear = pYear, pMonth); |
33 |
|
- |
} |
34 |
|
- |
|
35 |
|
- |
@SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */ |
36 |
|
- |
protected CalendarYM() |
37 |
|
- |
{ |
38 |
|
- |
this( 0, 0 ); |
|
23 |
+ |
super( pYear, pMonth ); |
39 |
24 |
|
} |
40 |
25 |
|
|
41 |
26 |
|
public CalendarYM( CalendarAccessorYM pAccessor ) |
|
@@ -97,7 +82,7 @@ |
97 |
82 |
|
@Override |
98 |
83 |
|
public UtilDateAdaptor toUtilDateAdaptor() |
99 |
84 |
|
{ |
100 |
|
- |
return UtilDateAdaptor.wall( getYear(), getMonth() ); |
|
85 |
+ |
return UtilDateAdaptor.currentWall( getYear(), getMonth() ); |
101 |
86 |
|
} |
102 |
87 |
|
|
103 |
88 |
|
// vvvvvvvvvvvvvvvvvv Support methods vvvvvvvvvvvvvvvvv |
|
@@ -109,6 +94,12 @@ |
109 |
94 |
|
} |
110 |
95 |
|
|
111 |
96 |
|
@Override |
|
97 |
+ |
protected Mutable createMutable( int pNewYear ) |
|
98 |
+ |
{ |
|
99 |
+ |
return new Mutable( pNewYear, getMonth() ); |
|
100 |
+ |
} |
|
101 |
+ |
|
|
102 |
+ |
@Override |
112 |
103 |
|
protected Mutable createMutable( int pYear, int pNewMonth ) |
113 |
104 |
|
{ |
114 |
105 |
|
return new Mutable( pYear, pNewMonth ); |