Skip to content

Commit

Permalink
feat!: Remove deprecated Daylight Savings Time (DST) methods (deephav…
Browse files Browse the repository at this point in the history
…en#5266)

BREAKING CHANGE: Remove deprecated Daylight Savings Time (DST) methods

Follow on to deephaven#5245 in 0.34.0
  • Loading branch information
chipkent committed Jun 24, 2024
1 parent 5d1c519 commit 7ec5131
Showing 1 changed file with 0 additions and 193 deletions.
193 changes: 0 additions & 193 deletions engine/time/src/main/java/io/deephaven/time/DateTimeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2931,199 +2931,6 @@ public static int minuteOfHour(@Nullable final ZonedDateTime dateTime) {
return dateTime.getMinute();
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// ↓↓↓↓↓↓↓ THE METHODS BELOW ARE DEPRECATED AND WILL BE REMOVED SOON ↓↓↓↓↓↓↓
///////////////////////////////////////////////////////////////////////////////////////////////////

/**
* Returns the number of nanoseconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param instant time
* @param timeZone time zone
* @return {@link QueryConstants#NULL_LONG} if either input is {@code null}; otherwise, number of nanoseconds that
* have elapsed since the top of the day
* @deprecated Use {@link #nanosOfDay(Instant, ZoneId, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static long nanosOfDay(@Nullable final Instant instant, @Nullable final ZoneId timeZone) {
return nanosOfDay(instant, timeZone, false);
}

/**
* Returns the number of nanoseconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param dateTime time
* @return {@link QueryConstants#NULL_LONG} if either input is {@code null}; otherwise, number of nanoseconds that
* have elapsed since the top of the day
* @deprecated Use {@link #nanosOfDay(ZonedDateTime, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static long nanosOfDay(@Nullable final ZonedDateTime dateTime) {
return nanosOfDay(dateTime, false);
}

/**
* Returns the number of milliseconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param instant time
* @param timeZone time zone
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of milliseconds that
* have elapsed since the top of the day
* @deprecated Use {@link #millisOfDay(Instant, ZoneId, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int millisOfDay(@Nullable final Instant instant, @Nullable final ZoneId timeZone) {
return millisOfDay(instant, timeZone, false);
}

/**
* Returns the number of milliseconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param dateTime time
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of milliseconds that
* have elapsed since the top of the day
* @deprecated Use {@link #millisOfDay(ZonedDateTime, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int millisOfDay(@Nullable final ZonedDateTime dateTime) {
return millisOfDay(dateTime, false);
}

/**
* Returns the number of seconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param instant time
* @param timeZone time zone
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of seconds that have
* elapsed since the top of the day
* @deprecated Use {@link #secondOfDay(Instant, ZoneId, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int secondOfDay(@Nullable final Instant instant, @Nullable final ZoneId timeZone) {
return secondOfDay(instant, timeZone, false);
}

/**
* Returns the number of seconds that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param dateTime time
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of seconds that have
* elapsed since the top of the day
* @deprecated Use {@link #secondOfDay(ZonedDateTime, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int secondOfDay(@Nullable final ZonedDateTime dateTime) {
return secondOfDay(dateTime, false);
}

/**
* Returns the number of minutes that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param instant time
* @param timeZone time zone
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of minutes that have
* elapsed since the top of the day
* @deprecated Use {@link #minuteOfDay(Instant, ZoneId, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int minuteOfDay(@Nullable final Instant instant, @Nullable final ZoneId timeZone) {
return minuteOfDay(instant, timeZone, false);
}

/**
* Returns the number of minutes that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param dateTime time
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of minutes that have
* elapsed since the top of the day
* @deprecated Use {@link #minuteOfDay(ZonedDateTime, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int minuteOfDay(@Nullable final ZonedDateTime dateTime) {
return minuteOfDay(dateTime, false);
}

/**
* Returns the number of hours that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param instant time
* @param timeZone time zone
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of hours that have
* elapsed since the top of the day
* @deprecated Use {@link #hourOfDay(Instant, ZoneId, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int hourOfDay(@Nullable final Instant instant, @Nullable final ZoneId timeZone) {
return hourOfDay(instant, timeZone, false);
}

/**
* Returns the number of hours that have elapsed since the top of the day.
* <p>
* On days when daylight savings time events occur, results may be different from what is expected based upon the
* local time. For example, on daylight savings time change days, 9:30AM may be earlier or later in the day based
* upon if the daylight savings time adjustment is forwards or backwards.
*
* @param dateTime time
* @return {@link QueryConstants#NULL_INT} if either input is {@code null}; otherwise, number of hours that have
* elapsed since the top of the day
* @deprecated Use {@link #hourOfDay(ZonedDateTime, boolean)} instead. To be removed soon.
*/
@Deprecated
@ScriptApi
public static int hourOfDay(@Nullable final ZonedDateTime dateTime) {
return hourOfDay(dateTime, false);
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// ↑↑↑↑↑↑↑ THE METHODS ABOVE ARE DEPRECATED AND WILL BE REMOVED SOON ↑↑↑↑↑↑↑
///////////////////////////////////////////////////////////////////////////////////////////////////

/**
* Returns the number of nanoseconds that have elapsed since the start of the day.
*
Expand Down

0 comments on commit 7ec5131

Please sign in to comment.