Package io.deephaven.integrations.python
Class PythonTimeComponents
java.lang.Object
io.deephaven.integrations.python.PythonTimeComponents
Utility functions for
time.py to extract java.time components in a single call.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic long[]Extracts the components from aDuration.static long[]Extracts the components from anInstant.static long[]Extracts theInstantcomponents from aZonedDateTime.static int[]Extracts the components from aLocalDate.static int[]Extracts theLocalDatecomponents from aZonedDateTime.static int[]Extracts the components from aLocalTime.static int[]Extracts the local time components from aZonedDateTime.static int[]Extracts the components from aPeriod.
-
Constructor Details
-
PythonTimeComponents
public PythonTimeComponents()
-
-
Method Details
-
getLocalTimeComponents
Extracts the components from aLocalTime. Equivalent tonew int[] {dt.getHour(), dt.getMinute(), dt.getSecond(), dt.getNano()}.- Parameters:
dt- the local time- Returns:
- the components
-
getLocalTimeComponents
Extracts the local time components from aZonedDateTime. Equivalent togetComponents(dt.toLocalTime()).- Parameters:
dt- the zoned date time- Returns:
- the components
- See Also:
-
getInstantComponents
Extracts the components from anInstant. Equivalent tonew long[] {dt.getEpochSecond(), dt.getNano()}.- Parameters:
dt- the instant- Returns:
- the components
-
getInstantComponents
- Parameters:
dt- the zoned date time- Returns:
- the components
- See Also:
-
getDurationComponents
Extracts the components from aDuration. Equivalent tonew long[] {dt.getSeconds(), dt.getNano()}.- Parameters:
dt- the duration- Returns:
- the components
-
getPeriodComponents
Extracts the components from aPeriod. Equivalent tonew int[] {dt.getYears(), dt.getMonths(), dt.getDays()}.- Parameters:
dt- the period- Returns:
- the components
-
getLocalDateComponents
Extracts the components from aLocalDate. Equivalent tonew int[] {dt.getYear(), dt.getMonthValue(), dt.getDayOfMonth()}.- Parameters:
dt- the local date- Returns:
- the components
-
getLocalDateComponents
Extracts theLocalDatecomponents from aZonedDateTime. Equivalent togetComponents(dt.toLocalDate()).- Parameters:
dt- the zoned date time- Returns:
- the components
- See Also:
-