datetime#
2026-03-11
22 min read time
- pylibhipdf.datetime.DatetimeComponent#
alias of
datetime_component
- pylibhipdf.datetime.RoundingFrequency#
alias of
rounding_frequency
- pylibhipdf.datetime.add_calendrical_months(signatures, args, kwargs, defaults, _fused_sigindex={})#
Adds or subtracts a number of months from the datetime type and returns a timestamp column that is of the same type as the input timestamps column.
For details, see
add_calendrical_months().Parameters#
- inputColumn
The column of input timestamp values.
- monthsColumnOrScalar
The number of months to add.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of computed timestamps.
- pylibhipdf.datetime.ceil_datetimes(Column input, rounding_frequency freq, Stream stream=None) Column#
Round datetimes up to the nearest multiple of the given frequency.
For details, see
ceil_datetimes().Parameters#
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round up to.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of the same datetime resolution as the input column.
- pylibhipdf.datetime.day_of_year(Column input, Stream stream=None) Column#
Computes the day number since the start of the year from the datetime. The value is between [1, {365-366}].
For details, see
day_of_year().Parameters#
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of day numbers.
- pylibhipdf.datetime.days_in_month(Column input, Stream stream=None) Column#
Extract the number of days in the month.
For details, see
days_in_month().Parameters#
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of the number of days in the given month.
- pylibhipdf.datetime.extract_datetime_component(Column input, datetime_component component, Stream stream=None) Column#
Extract a datetime component from a datetime column.
For details, see
cudf::extract_datetime_component().Parameters#
- inputColumn
The column to extract the component from.
- componentDatetimeComponent
The datetime component to extract.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column with the extracted component.
- pylibhipdf.datetime.extract_quarter(Column input, Stream stream=None) Column#
Returns the quarter (ie. a value from {1, 2, 3, 4}) that the date is in.
For details, see
extract_quarter().Parameters#
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column indicating which quarter the date is in.
- pylibhipdf.datetime.floor_datetimes(Column input, rounding_frequency freq, Stream stream=None) Column#
Round datetimes down to the nearest multiple of the given frequency.
For details, see
floor_datetimes().Parameters#
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round down to.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of the same datetime resolution as the input column.
- pylibhipdf.datetime.is_leap_year(Column input, Stream stream=None) Column#
Check if the year of the given date is a leap year.
For details, see
is_leap_year().Parameters#
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of bools indicating whether the given year is a leap year.
- pylibhipdf.datetime.last_day_of_month(Column input, Stream stream=None) Column#
Computes the last day of the month.
For details, see
last_day_of_month().Parameters#
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of
TIMESTAMP_DAYSrepresenting the last day of the month.
- pylibhipdf.datetime.round_datetimes(Column input, rounding_frequency freq, Stream stream=None) Column#
Round datetimes to the nearest multiple of the given frequency.
For details, see
round_datetimes().Parameters#
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round to.
- streamStream | None
CUDA stream on which to perform the operation.
Returns#
- Column
Column of the same datetime resolution as the input column.