Skip to content

Add parsing helper functions for DateTime, Date, Time, and Duration#951

Open
sudoscrawl wants to merge 18 commits intopython-pendulum:masterfrom
sudoscrawl:master
Open

Add parsing helper functions for DateTime, Date, Time, and Duration#951
sudoscrawl wants to merge 18 commits intopython-pendulum:masterfrom
sudoscrawl:master

Conversation

@sudoscrawl
Copy link

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

This PR adds parsing helper functions:

  • parse_datetime
  • parse_date
  • parse_time
  • parse_duration

These functions provide a convenient to parse string without having to use assert isinstance(..., Time) everytime while parsing in type checked codebases.
Closes #917

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.

parse_dt method that specifically returns a DateTime

1 participant