Ejemplo n.º 1
0
 /** Parse value string into a Abstime. */
 public static Abstime parse(String val) throws Exception {
   Abstime a = new Abstime();
   a.decodeVal(val);
   return a;
 }
Ejemplo n.º 2
0
 /**
  * Get the prev day of the specified weekday. If today is the specified weekday, then return one
  * week before now.
  */
 public Abstime prevWeekday(int weekday) {
   Abstime t = prevDay();
   while (t.getWeekday() != weekday) t = t.prevDay();
   return t;
 }
Ejemplo n.º 3
0
 /** Is the time of the specified instance equal to the date of this instance? */
 public boolean timeEquals(Abstime that) {
   return that.getTimeOfDayMillis() == getTimeOfDayMillis();
 }
Ejemplo n.º 4
0
 /**
  * Get the next day of the specified weekday. If today is the specified weekday, then return one
  * week from now.
  */
 public Abstime nextWeekday(int weekday) {
   Abstime t = nextDay();
   while (t.getWeekday() != weekday) t = t.nextDay();
   return t;
 }
Ejemplo n.º 5
0
 /** Is the date of the specified instance equal to the date of this instance? */
 public boolean dateEquals(Abstime that) {
   return (that.getYear() == getYear())
       && (that.getMonth() == getMonth())
       && (that.getDay() == getDay());
 }