<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63912>63912</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`<chrono>`: `month::operator++/--` implementation is wrong
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hewillk
</td>
</tr>
</table>
<pre>
https://github.com/llvm/llvm-project/blob/d71329773d9ac0ba8cf570dc0d5ad89ce20a00c2/libcxx/include/__chrono/month.h#L34-L37
According to [[time.cal.month.members]](https://eel.is/c++draft/time.cal.month.members), the result after `month` increment should be in [1, 12].
```cpp
#include <chrono>
// only libc++ failed
static_assert(
[] {
auto m = std::chrono::December;
++m;
return m.ok();
}()
);
```
https://godbolt.org/z/z1d3oM86f
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk8uSqzYQhp-m2ahMiZa5LVjYh7A6eYYpITVGGYFcksjM5OlTAjuepCqLUyUuarql_n5-yRDMbSXqoLxC2Wdyi7Pz3Uwfxtr3bHT6q5tjvAcQF8ABcLiZOG9jrtwCOFj75_Nxunv3B6kIOIzWjYCDrguBbV0L3UrFR9moqay5VlyXUjetIuSSc4VpATOqz0_AwazKbpoAh7c3NXu3OsBhcWuc8xlQ_BTn009RA--BX477RSnntVlvLDq2U1yjWShX0uZH4ULLSD5A2aeBzb95iGxuAuCgAK-AV-3llCD-ZxFsAX-wOBPzFDYbmZwieQYV3_Og4sysytNCa2RhdpvVbCRm1tRbkWoLhLLPHwgVP4a63x8RFA8NGIgfDwnEb9-Jj76ZW-0XS8IdfbNJGkv6SAlRRqPeZAjkI2BzRNmhT8-gvj4jjMktOrYwED0LUSddxOW5b3rvSe3sIJ5Fx4bLK8AY8xQ3v7Ild-9pP2y_pdf9I_Ro__XtH_5j-h-nOT06G3Pnb4DDX-kqtHC_N9V0pGe6E7oVrcyoK6qmrXhT1ZjNHY1tPcmJ5FhXdV2KdiobbEqONSpRlEVmOuQoeF3URXk-C8yVPo9l2UyEijRvBJw5LdLYPFk7dZCZEDbqKtEWmFk5kg3PM-O73f_jdgtw5taEGF5l0URLXSL8_jfT9PIyza6zu5OX0flDXcDhdNrdtNzt7iYZjVuZCezDu_WWbd7--sncIZLZd46_AwAA__9UIizt">