guardrails icon indicating copy to clipboard operation
guardrails copied to clipboard

Make datetime separate datatype

Open jonasferoz opened this issue 1 year ago • 2 comments

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.

jonasferoz avatar Oct 25 '23 18:10 jonasferoz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: 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.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 27 '23 20:10 codecov-commenter

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

vercel[bot] avatar Nov 02 '23 10:11 vercel[bot]

outdated, we're now only supporting datatypes available in JsonSchema

zsimjee avatar Jul 10 '24 22:07 zsimjee