Subversion Repository Public Repository

litesoft

Diff Revisions 852 vs 853 for /trunk/Java/core/Anywhere/src/org/litesoft/core/util/ExpirationLine.java

Diff revisions: vs.
  @@ -11,7 +11,7 @@
11 11 {
12 12 private static final Logger LOGGER = LoggerFactory.getLogger( ExpirationLine.class );
13 13
14 - private static DateFormat EXPIRATION_FORMAT = new DateFormat( "MM/yyyy" );
14 + public static DateFormat EXPIRATION_FORMAT = new DateFormat( "MM/yyyy" );
15 15
16 16 private int mQuantity, mMonth, mYear;
17 17
  @@ -25,7 +25,7 @@
25 25 public ExpirationLine( int pQuantity, int pDeltaMonths )
26 26 {
27 27 mQuantity = pQuantity;
28 - SimpleDate zDate = today().addMonths( pDeltaMonths );
28 + SimpleDate zDate = SimpleDate.today().addMonths( pDeltaMonths );
29 29 mMonth = zDate.getMonth();
30 30 mYear = zDate.getYear();
31 31 }
  @@ -65,17 +65,17 @@
65 65
66 66 public int getDaysRemaining()
67 67 {
68 - return today().daysTill( getExpirationDate() );
68 + return SimpleDate.today().daysTill( getExpirationDate() );
69 69 }
70 70
71 71 public SimpleDate getExpiration()
72 72 {
73 - return new SimpleDate( EXPIRATION_FORMAT, mYear, mMonth );
73 + return new SimpleDate( mYear, mMonth );
74 74 }
75 75
76 76 public SimpleDate getExpirationDate()
77 77 {
78 - return new SimpleDate( DateFormat.DEFAULT_YMD, mYear, mMonth, Month.daysIn( mYear, mMonth ) );
78 + return new SimpleDate( mYear, mMonth, Month.daysIn( mYear, mMonth ) );
79 79 }
80 80
81 81 public int getQuantity()
  @@ -93,11 +93,6 @@
93 93 return mYear;
94 94 }
95 95
96 - private SimpleDate today()
97 - {
98 - return new SimpleDate( DateFormat.DEFAULT_YMD, new UtilDateAdaptor() );
99 - }
100 -
101 96 public int compareTo( ExpirationLine them )
102 97 {
103 98 return compareEm( compare( this.mYear, them.mYear ), //