Show / Hide Table of Contents

Class DateFilter

Filter for date fields.

Inheritance
System.Object
Filter
DateFilter
Implements
ICustomFieldFilter
IFilter
System.ICloneable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Moraware.JobTrackerAPI5
Assembly: JobTrackerAPI5.dll
Syntax
public class DateFilter : Filter, ICustomFieldFilter, IFilter, ICloneable

Constructors

DateFilter(Boolean)

Intended to allow creation of a filter for an empty date.

Declaration
public DateFilter(bool empty_)
Parameters
Type Name Description
System.Boolean empty_

True if the filter should limit to missing dates.

DateFilter(Nullable<DateTime>, Nullable<DateTime>)

Creates a filter specifying an explicit date range.

Declaration
public DateFilter(DateTime? atLeastDate_, DateTime? atMostDate_)
Parameters
Type Name Description
System.Nullable<System.DateTime> atLeastDate_

If given, the date must occur no earlier than this.

System.Nullable<System.DateTime> atMostDate_

If given, the date must occur no later than this.

DateFilter(Nullable<DateTime>, Nullable<Int32>, Boolean)

Creates a filter specifying a combination of an explicit earliest date, and a relative latest date.

Declaration
public DateFilter(DateTime? atLeastDate_, int? atMostDays_, bool atMostDaysAgo_)
Parameters
Type Name Description
System.Nullable<System.DateTime> atLeastDate_

If given, the date must occur no earlier than this.

System.Nullable<System.Int32> atMostDays_

If given, the date must occur no later than this many days before or after today (depending on atMostDaysAgo_.

System.Boolean atMostDaysAgo_

True if atMostDays_ refers to AtMostDaysAgo, False if it refers to AtMostDaysFromToday.

DateFilter(Nullable<Int32>, Boolean, Nullable<DateTime>)

Creates a filter specifying a combination of an explicit earliest date, and a relative latest date.

Declaration
public DateFilter(int? atLeastDays_, bool atLeastDaysAgo_, DateTime? atMostDate_)
Parameters
Type Name Description
System.Nullable<System.Int32> atLeastDays_

If given, the date must occur no earlier than this many days before or after today (depending on atLeastDaysAgo_.

System.Boolean atLeastDaysAgo_

True if atLeastDays_ refers to AtLeastDaysAgo, False if it refers to AtLeastDaysFromToday.

System.Nullable<System.DateTime> atMostDate_

If given, the date must occur no later than this.

DateFilter(Nullable<Int32>, Boolean, Nullable<Int32>, Boolean)

Creates a filter specifying date ranges relative to 'Today'.

Declaration
public DateFilter(int? atLeastDays_, bool atLeastDaysAgo_, int? atMostDays_, bool atMostDaysAgo_)
Parameters
Type Name Description
System.Nullable<System.Int32> atLeastDays_

If given, the date must occur no earlier than this many days before or after today (depending on atLeastDaysAgo_.

System.Boolean atLeastDaysAgo_

True if atLeastDays_ refers to AtLeastDaysAgo, False if it refers to AtLeastDaysFromToday.

System.Nullable<System.Int32> atMostDays_

If given, the date must occur no later than this many days before or after today (depending on atMostDaysAgo_.

System.Boolean atMostDaysAgo_

True if atMostDays_ refers to AtMostDaysAgo, False if it refers to AtMostDaysFromToday.

Properties

AtLeastDate

When set, requires filtered dates to be no earlier than this date. Also, when this value is set to a non-null value, Empty is set to false, and both AtLeastDaysAgo and AtLeastDaysFromToday are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public DateTime? AtLeastDate { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

AtLeastDaysAgo

When set, requires filtered dates to be no earlier than this date. Also, when this value is set to a non-null value, Empty is set to false and both AtLeastDate and AtLeastDaysFromToday are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public int? AtLeastDaysAgo { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

AtLeastDaysFromToday

When set, requires filtered dates to be no earlier than this date. Also, when this value is set to a non-null value, Empty is set to false and both AtLeastDate and AtLeastDaysAgo are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public int? AtLeastDaysFromToday { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

AtMostDate

When set, requires filtered dates to be no later than this date. Also, when this value is set to a non-null value, Empty is set to false, and both AtMostDaysAgo and AtMostDaysFromToday are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public DateTime? AtMostDate { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

AtMostDaysAgo

When set, requires filtered dates to be no later than this date. Also, when this value is set to a non-null value, Empty is set to false, and both AtMostDate and AtMostDaysFromToday are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public int? AtMostDaysAgo { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

AtMostDaysFromToday

When set, requires filtered dates to be no later than this date. Also, when this value is set to a non-null value, Empty is set to false, and both AtMostDate and AtMostDaysFromToday are set to null. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public int? AtMostDaysFromToday { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

Empty

True if the filter should match only empty values. False if the filter should make use of the search text. Setting this value to True automatically clears all of the other properties. If Empty=False and all the other filter properties are null, using this filter will result in an exception.

Declaration
public bool Empty { get; set; }
Property Value
Type Description
System.Boolean

FilterType

Identifies the filter type.

Declaration
public CustomFieldFilterType_Enum FilterType { get; }
Property Value
Type Description
CustomFieldFilterType_Enum

Methods

BuildDescription(String, String)

Builds a description of the filter.

Declaration
public string BuildDescription(string fieldName_, string dateFormat_)
Parameters
Type Name Description
System.String fieldName_

Name of the field to use in the description of the filter.

System.String dateFormat_

(.NET) format string to be used on any dates that may be a part of the filter's description.

Returns
Type Description
System.String

A description of the filter

Clone()

Creates a copy of this filter.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A copy of this filter.

Overrides
Filter.Clone()

Implements

ICustomFieldFilter
IFilter
System.ICloneable
Back to top Generated by DocFX