mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps
Add also more tests for ROUNd_FLOOR.
This commit is contained in:
parent
c4bb599be0
commit
bcdd777d3c
4 changed files with 68 additions and 6 deletions
|
@ -2635,7 +2635,7 @@ static int
|
|||
check_time_rounding(int round)
|
||||
{
|
||||
if (round != _PyTime_ROUND_DOWN && round != _PyTime_ROUND_UP
|
||||
&& round != _PyTime_ROUND_FLOOR) {
|
||||
&& round != _PyTime_ROUND_FLOOR && round != _PyTime_ROUND_CEILING) {
|
||||
PyErr_SetString(PyExc_ValueError, "invalid rounding");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue