DateQuery

public final class DateQuery<T: Reflectable>: NilComparable, Matchable

A class that queries against NSDate properties in the T class.

  • A class that queries against NSDate properties in the T class.

    Declaration

    Swift

    public let builder: PredicateBuilder<T>
  • A class that queries against NSDate properties in the T class.

    Declaration

    Swift

    public let property: String
  • Undocumented

    Declaration

    Swift

    public final class DateQuery<T: Reflectable>: NilComparable, Matchable
  • Equivalent to the infix > operator for two dates. Equivalent to creating this predicate:

    class Kraken {
        var birthdate: NSDate
    }
    NSPredicate(format: "birthdate > %@", halloween2008)
    

    Fetch the `Kraken` object if it was born later than halloween2008

  • Parameters:
  • Date

    The date to compare against the property’s value.

  • file: Name of the file the function is being called from. Defaults to #file
  • line: Number of the line the function is being called from. Defaults to #line
  • Declaration

    Swift

    @discardableResult public func isLaterThan(_ date: Date) -> FinalizedIncluder<T>
  • Equivalent to the infix < operator for two dates. Equivalent to creating this predicate:

    class Kraken {
        var birthdate: NSDate
    }
    NSPredicate(format: "birthdate < %@", halloween2008)
    

    Fetch the `Kraken` object if it was born earlier than halloween2008

  • Parameters:
  • Date

    The date to compare against the property’s value.

  • file: Name of the file the function is being called from. Defaults to #file
  • line: Number of the line the function is being called from. Defaults to #line
  • Declaration

    Swift

    @discardableResult public func isEarlierThan(_ date: Date) -> FinalizedIncluder<T>
  • Equivalent to the infix >= operator for two dates. Equivalent to creating this predicate:

    class Kraken {
        var birthdate: NSDate
    }
    NSPredicate(format: "birthdate >= %@", halloween2008)
    

    Fetch the `Kraken` object if it was born on halloween2008 or later than halloween2008

  • Parameters:
  • Date

    The date to compare against the property’s value.

  • file: Name of the file the function is being called from. Defaults to #file
  • line: Number of the line the function is being called from. Defaults to #line
  • Declaration

    Swift

    @discardableResult public func isLaterThanOrOn(_ date: Date) -> FinalizedIncluder<T>
  • Equivalent to the infix <= operator for two dates. Equivalent to creating this predicate:

    class Kraken {
        var birthdate: NSDate
    }
    NSPredicate(format: "birthdate <= %@", halloween2008)
    

    Fetch the `Kraken` object if it was born on halloween2008 or earlier than halloween2008

  • Parameters:
  • Date

    The date to compare against the property’s value.

  • file: Name of the file the function is being called from. Defaults to #file
  • line: Number of the line the function is being called from. Defaults to #line
  • Declaration

    Swift

    @discardableResult public func isEarlierThanOrOn(_ date: Date) -> FinalizedIncluder<T>
  • Equivalent to the infix == operator for two dates. Equivalent to creating this predicate:

    class Kraken {
        var birthdate: NSDate
    }
    NSPredicate(format: "birthdate == %@", halloween2008)
    

    Fetch the `Kraken` object if it was born on halloween2008

  • Parameters:
  • Date

    The date to compare against the property’s value.

  • file: Name of the file the function is being called from. Defaults to #file
  • line: Number of the line the function is being called from. Defaults to #line
  • Declaration

    Swift

    @discardableResult public func equals(_ date: Date) -> FinalizedIncluder<T>