LocalTime.TruncatedTo(ITemporalUnit) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of this LocalTime with the time truncated.
[Android.Runtime.Register("truncatedTo", "(Ljava/time/temporal/TemporalUnit;)Ljava/time/LocalTime;", "", ApiSince=26)]
public Java.Time.LocalTime? TruncatedTo(Java.Time.Temporal.ITemporalUnit? unit);
[<Android.Runtime.Register("truncatedTo", "(Ljava/time/temporal/TemporalUnit;)Ljava/time/LocalTime;", "", ApiSince=26)>]
member this.TruncatedTo : Java.Time.Temporal.ITemporalUnit -> Java.Time.LocalTime
Parameters
- unit
- ITemporalUnit
the unit to truncate to, not null
Returns
a LocalTime based on this time with the time truncated, not null
- Attributes
Remarks
Returns a copy of this LocalTime with the time truncated. Truncation rounds the time down to a multiple of the unit within a standard day. For example, truncating with the minutes unit will set the second-of-minute and nano-of-second field to zero. The unit must have a duration that divides into the length of a standard day without remainder. This includes all supplied time units on ChronoUnit and DAYS. Other ChronoUnit values throw an exception. This instance is immutable and unaffected by this method call.
Java reference for java.time.LocalTime.truncatedTo.