monzo / response

Monzo's real-time incident response and reporting tool ⚡️
MIT License
1.52k stars 165 forks source link

Remove leading space from day in channel creation #179

Closed evnsio closed 4 years ago

evnsio commented 4 years ago

In strftime, %e has a leading space for single digit days. For example the 5th of the month would print as ' 5' (note the space).

Prior to this change, we were including this space in the call to channels.create, and slack was replacing the space with an extra hyphen.

This meant an incident on November 5th would show as #inc-nov--5-20-51-01 rather than the desired name of #inc-nov-5-20-51-01.

Adding a '-' in the %e format trims leading whitespace which corrects the problem.