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

Make datetime separate datatype #407

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonasferoz
Copy link
Contributor

@jonasferoz jonasferoz commented Oct 25, 2023

The dateutil library is robust, capable of parsing a wide variety of datetime formats, including those with seconds and milliseconds (see ‘ISO format’ and ‘Hours with letters work’).

However, given that Python’s standard datetime library provides options to return an object as a date, time, or datetime, it might be useful to introduce a separate DateTime datatype that exclusively returns the datetime.datetime object. This allows the existing Date and Time classes to handle their respective strings while returning datetime.date and datetime.time objects.

In addition, each datatype can handle its own edge cases such as Unix epoch strings or ISO date weeks, both of which have a rudimentary implementation in this pull request.

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@9df4acd). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage        ?   80.32%           
=======================================
  Files           ?       34           
  Lines           ?     3903           
  Branches        ?        0           
=======================================
  Hits            ?     3135           
  Misses          ?      768           
  Partials        ?        0           
Flag Coverage Δ
unittests 80.32% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

vercel bot commented Nov 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
guardrails ⬜️ Ignored (Inspect) Visit Preview Nov 3, 2023 0:28am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants