Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to convert datetimes to formatted strings #194

Closed
boccileonardo opened this issue Jan 2, 2025 · 3 comments
Closed

Add methods to convert datetimes to formatted strings #194

boccileonardo opened this issue Jan 2, 2025 · 3 comments

Comments

@boccileonardo
Copy link

Currently (0.6.16 ver) I have not found in the docs a way to turn a whenever object (instant or zoneddatetime) to a formatted string.
Is this in the roadmap?

@ariebovenberg
Copy link
Owner

Hi @boccileonardo, thanks for posting. Formatting in standard ways in supported with format_common_iso() as well as format_rfc2822() and format_rfc3339() (only Instant and OffsetDateTime though).

You probably mean customizable formatting like strftime though, right? This is on the roadmap for after 1.0 is released. For now, you'd have to convert to the standard library first, like d.py_datetime().strftime().

If you have any specific suggestions for customized formatting, feel free to post them.

@ariebovenberg
Copy link
Owner

ariebovenberg commented Jan 5, 2025

@boccileonardo I'm closing this issue for now, so the conversation can be centralized in issue #174. Let me know if I missed anything in my earlier reply.

@boccileonardo
Copy link
Author

All good, you got exactly my point, sorry for the long delay in reply, I was out on holidays.

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

No branches or pull requests

2 participants