TimeOfDay.toPhobos

std.datetime.date.TimeOfDay toPhobos() const @safe pure

Converts to a Phobos whole-second TimeOfDay (checked).

Returns

The Phobos value with the fraction dropped only when it is zero.

Throws

DateTimeException when the fraction is nonzero — use

toPhobosTruncated for explicit precision loss.