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

Support 2-arity options for Calendar.strftime/3 #14247

Merged
merged 3 commits into from
Feb 1, 2025

Conversation

kipcole9
Copy link
Contributor

This PR introduces support for 2-arity functions for Calendar.strftime/3 options per this proposal.

The result is that the options functions may be 1-arity and receive the term to be processed or 2-arity in which case they receive both the term and the datetime argument to Calendar.strftime/3.

The function documentation is updated but may well benefit from further work.

A single test case is added to verify that 2-arity functions are supported, and that the datetime is correctly passed to them. All tests are passing.

@josevalim josevalim merged commit b118698 into elixir-lang:main Feb 1, 2025
6 of 9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants