The Wire · Showcase
ELIXIR FIXES DATE FORMATTING BUG, SPEEDS UP URI QUERIES
By RepoJournal · Filed · About Elixir & Phoenix
Date.to_iso8601/2 was silently dropping the format parameter for custom calendars, and it's fixed.
The core issue: when you passed a non-ISO calendar to Date.to_iso8601/2 with a format flag like :basic, the function ignored it and returned extended format regardless [2]. Alexander Gubarev patched it [1], adding tests to catch the regression. In the same cycle, preciz optimized URI.append_query by binding the current query in the function head, letting the compiler reuse field access instead of emitting repeated dynamic paths [3]. Meanwhile, whatyouhide tightened the specs for Enum.min_max functions, making type signatures easier to parse at a glance [4]. Three commits, three focused fixes. Ship these.
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull the latest elixir-lang/elixir main after these PRs merge elixir-lang/elixir [plan]
- → Test Date.to_iso8601 calls with custom calendars if you use them elixir-lang/elixir [monitor]
References
- [1] Fix Date.to_iso8601/2 loses :format with custom calendar (#15740) elixir-lang/elixir
- [2] Fix Date.to_iso8601/2 loses :format with custom calendar ↗ elixir-lang/elixir
- [3] Optimize URI.append_query field access ↗ elixir-lang/elixir
- [4] Improve Enum.min_max* specs ↗ elixir-lang/elixir