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 net45, netstandard1.3
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
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 net45, netstandard1.3
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. (The value returned is never null.) |
TruncateToMinute
Gets a time adjuster to truncate the time to the minute, discarding fractional minutes.
Since 2.0.x
Availability net45, netstandard1.3
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. (The value returned is never null.) |
TruncateToSecond
Gets a time adjuster to truncate the time to the second, discarding fractional seconds.
Since 2.0.x
Availability net45, netstandard1.3
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. (The value returned is never null.) |