Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datetime::is_leap_year #8711

Merged
merged 4 commits into from
Jul 13, 2021
Merged

Add datetime::is_leap_year #8711

merged 4 commits into from
Jul 13, 2021

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Jul 9, 2021

Part 1 of #8677

This PR adds datetime::is_leap_year. The function returns true for datetime column rows with leap year; false for rows with non leap years, and null for null rows.

@isVoid isVoid requested a review from a team as a code owner July 9, 2021 23:30
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Jul 9, 2021
@isVoid isVoid added feature request New feature or request non-breaking Non-breaking change labels Jul 9, 2021
@codecov
Copy link

codecov bot commented Jul 10, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.08@a5427d2). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 8b0c363 differs from pull request most recent head 37a1f96. Consider uploading reports for the commit 37a1f96 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.08    #8711   +/-   ##
===============================================
  Coverage                ?   10.67%           
===============================================
  Files                   ?      109           
  Lines                   ?    18670           
  Branches                ?        0           
===============================================
  Hits                    ?     1993           
  Misses                  ?    16677           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5427d2...37a1f96. Read the comment docs.

cpp/include/cudf/detail/datetime.hpp Show resolved Hide resolved
cpp/src/datetime/datetime_ops.cu Outdated Show resolved Hide resolved
cpp/include/cudf/datetime.hpp Outdated Show resolved Hide resolved
cpp/src/datetime/datetime_ops.cu Outdated Show resolved Hide resolved
@isVoid
Copy link
Contributor Author

isVoid commented Jul 12, 2021

The implementation has changed to largely reusing existing apply_datetime_op scaffolding.

@isVoid isVoid requested review from karthikeyann and jrhemstad July 12, 2021 20:32
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@harrism
Copy link
Member

harrism commented Jul 13, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit b0d86d2 into rapidsai:branch-21.08 Jul 13, 2021
rapids-bot bot pushed a commit that referenced this pull request Jul 26, 2021
Partly addresses #8676.
This PR adds `date_time:: extract_quarter`. The function returns an int `(1,2,3,4)` depending on which quarter of the year the date is in. Also fixed an incorrect date in previous testcase (#8711).

Authors:
  - https://github.com/shaneding

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Conor Hoekstra (https://github.com/codereport)

URL: #8779
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants