• Home
  • API Documentation
Show / Hide Table of Contents
  • TimeyWimey
    • DateTimeExtensions
      • ChangeKind
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeOffsetExtensions
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeRange
      • CompareTo
      • Contains
      • Create
      • DateTimeRange
      • End
      • EndAt
      • Equality
      • Equals
      • GetHashCode
      • GreaterThan
      • Inequality
      • Length
      • LessThan
      • Overlaps
      • Start
      • StartAt
    • NumberToTimespanExtensions
      • Days
      • Hours
      • Milliseconds
      • Minutes
      • Seconds
    • TimeSpans
      • EightHours
      • EightMilliseconds
      • FifteenMilliseconds
      • FifteenMinutes
      • FifteenSeconds
      • FiveDays
      • FiveHours
      • FiveHundredMilliseconds
      • FiveMilliseconds
      • FiveMinutes
      • FiveSeconds
      • FortyFiveMinutes
      • FortyFiveSeconds
      • FourteenDays
      • NinetyDays
      • OneDay
      • OneHour
      • OneHundredAndTwentyDays
      • OneHundredMilliseconds
      • OneMillisecond
      • OneMinute
      • OneSecond
      • SevenDays
      • SixteenMilliseconds
      • SixtyDays
      • TenHours
      • TenMilliseconds
      • TenMinutes
      • TenSeconds
      • ThirtyDays
      • ThirtyMinutes
      • ThirtyOneDays
      • ThirtySeconds
      • ThreeDays
      • ThreeHours
      • ThreeHundredAndSixtyFiveDays
      • ThreeMinutes
      • ThreeSeconds
      • TwelveHours
      • TwentyFourHours
      • TwentyMilliseconds
      • TwentyMinutes
      • TwentySeconds
      • TwoDays
      • TwoHours
      • TwoHundredAndFiftyMilliseconds
      • TwoMinutes
      • TwoSeconds
    • UnixTime
      • ToDateTime
      • ToDateTimeOffset
      • ToUnixTimestamp
      • UnixEpoch
      • UnixEpochDateTimeOffset
  • TimeyWimey.Abstractions
    • CachingClock
      • CachingClock
      • Dispose
      • Now
    • ClockBase
      • Adjusted
      • Now
      • OnAdjusted
    • IClock
      • Adjusted
      • Now
    • MockClock
      • Now
      • SetTime
    • SystemClock
      • Now
  • TimeyWimey.Tests
    • NumberToTimespanExtensions
      • DoubleToDays_InitialisesTimeSpanCorrectly
      • DoubleToHours_InitialisesTimeSpanCorrectly
      • DoubleToMilliseconds_InitialisesTimeSpanCorrectly
      • DoubleToMinutes_InitialisesTimeSpanCorrectly
      • DoubleToSeconds_InitialisesTimeSpanCorrectly
      • FloatToDays_InitialisesTimeSpanCorrectly
      • FloatToHours_InitialisesTimeSpanCorrectly
      • FloatToMilliseconds_InitialisesTimeSpanCorrectly
      • FloatToMinutes_InitialisesTimeSpanCorrectly
      • FloatToSeconds_InitialisesTimeSpanCorrectly
      • IntegerToDays_InitialisesTimeSpanCorrectly
      • IntegerToHours_InitialisesTimeSpanCorrectly
      • IntegerToMilliseconds_InitialisesTimeSpanCorrectly
      • IntegerToMinutes_InitialisesTimeSpanCorrectly
      • IntegerToSeconds_InitialisesTimeSpanCorrectly
      • LongToDays_InitialisesTimeSpanCorrectly
      • LongToHours_InitialisesTimeSpanCorrectly
      • LongToMilliseconds_InitialisesTimeSpanCorrectly
      • LongToMinutes_InitialisesTimeSpanCorrectly
      • LongToSeconds_InitialisesTimeSpanCorrectly

Method Contains

Contains(DateTimeRange)

Returns true if both the start and end properties of other fall within this date range, or if other is equal to this date range.

Declaration
public bool Contains(DateTimeRange other)
Parameters
Type Name Description
DateTimeRange other

Another DateTimeRange to compare to.

Returns
Type Description
System.Boolean

True if this range specified by this instance contains the range specified by other.

Contains(DateTime)

Returns true if the date and time specified by moment falls within the range specified by this instance, otherwise false.

Declaration
public bool Contains(DateTime moment)
Parameters
Type Name Description
System.DateTime moment

A System.DateTime instance to check.

Returns
Type Description
System.Boolean

True if the date and time specified by moment falls within the range specified by this instance, otherwise false.

Back to top Copyright (c) 2017 Troy Willmot