Class TimeAdjusters
Factory class for time adjusters: functions from LocalTime to
LocalTime
,
which can be applied to LocalTime, LocalDateTime, and OffsetDateTime.
Since 2.0.x
Availability net6.0, net8.0, netstandard2.0
Inherited Members
Namespace: NodaTime
Assembly: NodaTime.dll
Syntax
public static class TimeAdjusters
Properties
TruncateToHour
Get a time adjuster to truncate the time to the hour, discarding fractional hours.
Since 2.0.x
Availability net6.0, net8.0, netstandard2.0
Declaration
public static Func<LocalTime, LocalTime> TruncateToHour { get; }
Property Value
Type | Description |
---|---|
Func<LocalTime, LocalTime> | A time adjuster to truncate the time to the hour, discarding fractional hours. |
TruncateToMinute
Gets a time adjuster to truncate the time to the minute, discarding fractional minutes.
Since 2.0.x
Availability net6.0, net8.0, netstandard2.0
Declaration
public static Func<LocalTime, LocalTime> TruncateToMinute { get; }
Property Value
Type | Description |
---|---|
Func<LocalTime, LocalTime> | A time adjuster to truncate the time to the minute, discarding fractional minutes. |
TruncateToSecond
Gets a time adjuster to truncate the time to the second, discarding fractional seconds.
Since 2.0.x
Availability net6.0, net8.0, netstandard2.0
Declaration
public static Func<LocalTime, LocalTime> TruncateToSecond { get; }
Property Value
Type | Description |
---|---|
Func<LocalTime, LocalTime> | A time adjuster to truncate the time to the second, discarding fractional seconds. |