Skip to content

Conversation

@sdispater
Copy link
Collaborator

The instance() function now accepts 'date', time or datetime instances.

This PR also reorganizes the DateTime code to make it inheritable, which was not the case due to the usage of instance().

Fixes #250
Fixes #203
Supersedes #707

Pull Request Check List

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

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 15, 2023

CodSpeed Performance Report

Merging #732 will improve performances by 24.36%

Comparing feature/instance-all-types (e807ca0) with master (29c15a6)

Summary

🔥 1 improvements
✅ 1 untouched benchmarks

Benchmarks breakdown

Benchmark master feature/instance-all-types Change
🔥 test_format 2.8 ms 2.3 ms +24.36%

sdispater and others added 2 commits August 15, 2023 13:10
@sdispater sdispater force-pushed the feature/instance-all-types branch from 43c4c81 to e807ca0 Compare August 15, 2023 11:10
@sdispater sdispater merged commit 77d1791 into master Aug 15, 2023
@sdispater sdispater deleted the feature/instance-all-types branch August 15, 2023 11:46
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.

Initialize from existing datetime.date object? pendulum.DateTime using hardcoded pendulum.datetime in methods

2 participants