chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Documentation correction for `and_time`

Open ralpha opened this issue 4 years ago • 0 comments

The function Date::and_time(...) looks to have incorrect documentation.

This function states:

Panics on invalid datetime.

But the function returns an Option<...> and it looks like it will return None if the datetime is invalid. (for example when in between daylight savings time) It might still panic in other cases, but I don't know.

But I think this should be changed to:

Returns None on invalid time.

ralpha avatar Sep 27 '21 11:09 ralpha