The banning functionality that is built into dedicated servers supports expiry dates.
However, the commands to issue them from in-game do not expose this.
Expiry dates are supported via the new jsonrpc API via the expiry field, which means a normal server admin can issue bans with expiry dates, but is unable via commands.
Thank you for your report!
However, this issue is Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki