Open xmo-odoo opened 6 years ago
The next()
method and all its parameters are displayed in the doc. It's not an API reference but it displays what to expect from the method.
The API reference on the website is not to be used. This is just some leftovers of a previous attempt.
Another one that seems undocumented is replace
, which also has a fold
argument. Aside from the support for the fold
argument and tz
argument replaced with tzinfo
, replace seems largely similar to set
.
As for fold
itself, I do see it in the Using the timezone library directly section of the documentation, which says it's actually from Python's native datetime
in 3.6+. That lead me to this helpful Stack Overflow answer, which finally leads to PEP 495.
@xmo-odoo: the link to the kinda sorta reference is broken.
@wsw70 I expect it was removed following
The API reference on the website is not to be used. This is just some leftovers of a previous attempt.
@xmo-odoo : thanks. I found your question after raising mine (https://github.com/sdispater/pendulum/issues/399) as they are quite related
Added an auto-updating doc using sphinx-apidoc, hosted at https://pendulum.readthedocs.io/. Let me know if there's an official API reference that should be hosted there.
@metatooling Thanks for taking the time to do that but I would prefer not to have a documentation that is not official on RTD since that can confuse users. The only reference for the documentation should only be on the official website.
Sure, I don't want to confuse anybody. I've cleaned it up a bit, moved it it to pendulum-unofficial and added a more prominent disclaimer at the top of every page.
The reason I made it is that I find Sphinx API reference easier to use than help(pendulum.DateTime)
while I'm working. I believe I have it configured to update after every change to sdispater/pendulum
's master
branch.
If you'd rather there be no API reference until an official one is released, I'll take it down and only use it locally.
Is there any technical obstacle to releasing an API reference? I'd be happy to help make this possible. I think this is the only major Python library I've used without any kind of API reference at all.
The current documentation is basically a guide, showing examples of a bunch of methods but not actually documenting many (any?) of them. For instance
Pendulum.next
is mentioned/used several times but never actually explained/documented.Now technically Pendulum kinda sorta has a reference but:
Pendulum.copy
)fold
in the Pendulum constructor, is tzinfo UTC or whatever the machine's timezone — which just happens to be UTC on the one building the official doc, …)