Skip to content

Rebase of #423 to add docs, hopefully ready for merge - #1099

Merged
davidism merged 2 commits into
pallets:masterfrom
sirosen:type-datetime
Sep 13, 2018
Merged

Rebase of #423 to add docs, hopefully ready for merge#1099
davidism merged 2 commits into
pallets:masterfrom
sirosen:type-datetime

Conversation

@sirosen

Copy link
Copy Markdown
Contributor

#423 is pending on a documentation addition.
As with many other old PRs, I don't think we should necessarily expect the original author to come back to things. Trying to cleanup the backlog.

I considered pushing to the #423 branch, but I wanted to drop the commit which makes things py2.6 compatible (since it's no longer relevant) and dropping a commit from someone else's PR is bad form.

So, to restate:

  • adds click.DateTime type with a couple of tests
  • adds documentation for the above on the param types page
  • adds another ISO 8601 format string to the defaults: %Y-%m-%d %H:%M:%S, which is pretty commonly used in my experience
  • add a note to the changelog containing this new type

closes#423

@sirosen
sirosen requested a review from dsullyAugust 27, 2018 23:06
@sirosen
sirosenforce-pushed the type-datetime branch 3 times, most recently from bf934ef to 2d12764CompareAugust 28, 2018 15:12
santiagobasultoand others added 2 commits September 13, 2018 07:27
Add a docstring which defines the behaviors of the class, including
default formats supported, usage of ``datetime.strptime`` and "first
successful parse wins" behavior.
Also add '%Y-%m-%d %H:%M:%S' to the default formats, as it is at least
as commonly seen as '%Y-%m-%dT%H:%M:%S'.
Minor test fix to handle the new format.
Add ``click.DateTime`` to changelog.
@davidismdavidism added this to the 7.0 milestone Sep 13, 2018
@davidism
davidism merged commit 2c622ee into pallets:masterSep 13, 2018
@enricobarzettienricobarzetti mentioned this pull request Aug 20, 2020
6 tasks
@palletspallets locked as resolved and limited conversation to collaborators Aug 25, 2020
@kdeldyckekdeldycke added the docs Updates to documentation, readme, docstrings, typos label Aug 8, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docsUpdates to documentation, readme, docstrings, typos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sirosen@kdeldycke@davidism@santiagobasulto