Closed h4kuna closed 1 year ago
This is pretty tricky. To make it sensible, setTime(microsecond: 0)
would have to work, because the notation with many zeros and null is not good. But if you implement it that way, the whole thing can behave in surprising ways.
Yes you have right, all parameters must have default value null. The example setTime(microsecond: 0)
will work right. But I keep back compatibility. Because if all parameters will be null, this exists code will to work bad. setTime(1, 1)
.
The way where are all parameters null I like it more too.
What do you suggest?
I suggest to drop it. It's a little needed functionality, it smells like a problem and I would be the one who would have to deal with it :-)
ok
I keep default values like a parent. The back compatibility is ok.
You can more simply modify part of time. For example you want reset microseconds
More examples are in test.