/** * Returns the month in which this hour falls. * * @return The month. */ public int getMonth() { return this.day.getMonth(); }
/** * Returns the month in which this hour falls. * * @return The month. */ public int getMonth() { return this.day.getMonth(); }
/** * Returns the last millisecond of the minute. * * @param calendar the calendar / timezone (<code>null</code> not * permitted). * * @return The last millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getLastMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int day = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, day, this.hour, this.minute, 59); calendar.set(Calendar.MILLISECOND, 999); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the first millisecond of the minute. * * @param calendar the calendar/timezone ({@code null} not permitted). * * @return The first millisecond. * * @throws NullPointerException if {@code calendar} is {@code null}. */ @Override public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int d = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, d, this.hour, this.minute, this.second); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); }
/** * Returns the first millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The first millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 0, 0); calendar.set(Calendar.MILLISECOND, 0); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the first millisecond of the hour. * * @param calendar the calendar/timezone ({@code null} not permitted). * * @return The first millisecond. * * @throws NullPointerException if {@code calendar} is * {@code null}. */ @Override public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 0, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); }
/** * Returns the first millisecond of the minute. * * @param calendar the calendar which defines the timezone * ({@code null} not permitted). * * @return The first millisecond. * * @throws NullPointerException if {@code calendar} is * {@code null}. */ @Override public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int d = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, d, this.hour, this.minute, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); }
/** * Returns the first millisecond of the time period. * * @param calendar the calendar ({@code null} not permitted). * * @return The first millisecond of the time period. * * @throws NullPointerException if {@code calendar} is * {@code null}. */ @Override public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int d = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, d, this.hour, this.minute, this.second); calendar.set(Calendar.MILLISECOND, this.millisecond); return calendar.getTimeInMillis(); }
/** * Returns the first millisecond of the time period. * * @param calendar the calendar (<code>null</code> not permitted). * * @return The first millisecond of the time period. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int day = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, day, this.hour, this.minute, this.second); calendar.set(Calendar.MILLISECOND, this.millisecond); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the last millisecond of the hour. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The last millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getLastMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 59, 59); calendar.set(Calendar.MILLISECOND, 999); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the first millisecond of the minute. * * @param calendar the calendar which defines the timezone * (<code>null</code> not permitted). * * @return The first millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int day = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, day, this.hour, this.minute, 0); calendar.set(Calendar.MILLISECOND, 0); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the first millisecond of the minute. * * @param calendar the calendar/timezone (<code>null</code> not permitted). * * @return The first millisecond. * * @throws NullPointerException if <code>calendar</code> is * <code>null</code>. */ public long getFirstMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int day = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, day, this.hour, this.minute, this.second); calendar.set(Calendar.MILLISECOND, 0); //return calendar.getTimeInMillis(); // this won't work for JDK 1.3 return calendar.getTime().getTime(); }
/** * Returns the last millisecond of the hour. * * @param calendar the calendar/timezone ({@code null} not permitted). * * @return The last millisecond. * * @throws NullPointerException if {@code calendar} is * {@code null}. */ @Override public long getLastMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int dom = this.day.getDayOfMonth(); calendar.set(year, month, dom, this.hour, 59, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTimeInMillis(); }
/** * Returns the last millisecond of the minute. * * @param calendar the calendar / timezone ({@code null} not * permitted). * * @return The last millisecond. * * @throws NullPointerException if {@code calendar} is * {@code null}. */ @Override public long getLastMillisecond(Calendar calendar) { int year = this.day.getYear(); int month = this.day.getMonth() - 1; int d = this.day.getDayOfMonth(); calendar.clear(); calendar.set(year, month, d, this.hour, this.minute, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTimeInMillis(); }
/** * Returns the second. * * @return The second. */ public Second getSecond() { return new Second(this.second, this.minute, this.hour, this.day.getDayOfMonth(), this.day.getMonth(), this.day.getYear()); }
/** * Returns the second. * * @return The second. */ public Second getSecond() { return new Second(this.second, this.minute, this.hour, this.day.getDayOfMonth(), this.day.getMonth(), this.day.getYear()); }