Skip to content

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