Namespaces | Enumerations | Functions
datetime.hpp File Reference

DateTime column APIs. More...

#include <cudf/types.hpp>
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/export.hpp>
#include <cudf/utilities/memory_resource.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <memory>

Go to the source code of this file.

Namespaces

 cudf
 cuDF interfaces
 

Enumerations

enum class  cudf::datetime::datetime_component : uint8_t {
  YEAR , MONTH , DAY , WEEKDAY ,
  HOUR , MINUTE , SECOND , MILLISECOND ,
  MICROSECOND , NANOSECOND
}
 Types of datetime components that may be extracted.
 
enum class  cudf::datetime::rounding_frequency : int32_t {
  DAY , HOUR , MINUTE , SECOND ,
  MILLISECOND , MICROSECOND , NANOSECOND
}
 Fixed frequencies supported by datetime rounding functions ceil, floor, round.
 

Functions

std::unique_ptr< cudf::columncudf::datetime::extract_year (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts year from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_month (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts month from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_day (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts day from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_weekday (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts a weekday from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_hour (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts hour from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_minute (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts minute from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_second (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts second from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_millisecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts millisecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_microsecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts microsecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_nanosecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts nanosecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_datetime_component (cudf::column_view const &column, datetime_component component, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts the specified datetime component from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::last_day_of_month (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Computes the last day of the month in datetime type and returns a TIMESTAMP_DAYS cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::day_of_year (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Computes the day number since the start of the year from the datetime and returns an int16_t cudf::column. The value is between [1, {365-366}]. More...
 
std::unique_ptr< cudf::columncudf::datetime::add_calendrical_months (cudf::column_view const &timestamps, cudf::column_view const &months, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 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. More...
 
std::unique_ptr< cudf::columncudf::datetime::add_calendrical_months (cudf::column_view const &timestamps, cudf::scalar const &months, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 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. More...
 
std::unique_ptr< cudf::columncudf::datetime::is_leap_year (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Check if the year of the given date is a leap year. More...
 
std::unique_ptr< cudf::columncudf::datetime::days_in_month (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extract the number of days in the month. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_quarter (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Returns the quarter of the date. More...
 
std::unique_ptr< cudf::columncudf::datetime::ceil_datetimes (cudf::column_view const &column, rounding_frequency freq, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Round datetimes up to the nearest multiple of the given frequency. More...
 
std::unique_ptr< cudf::columncudf::datetime::floor_datetimes (cudf::column_view const &column, rounding_frequency freq, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Round datetimes down to the nearest multiple of the given frequency. More...
 
std::unique_ptr< cudf::columncudf::datetime::round_datetimes (cudf::column_view const &column, rounding_frequency freq, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Round datetimes to the nearest multiple of the given frequency. More...
 

Detailed Description

DateTime column APIs.

Definition in file datetime.hpp.