---
title: "isDateInYesterday(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/calendar/isdateinyesterday(_:)"
---

# isDateInYesterday(_:)

Returns a Boolean value indicating whether the given date is within yesterday.

## Declaration

```swift
func isDateInYesterday(_ date: Date) -> Bool
```

## Parameters

- `date`: The specified date.

## Return Value

Return Value true if the given date is within yesterday, as defined by the calendar and calendar’s locale; otherwise, false.

## See Also

### Comparing Dates

- [compare(_:to:toGranularity:)](foundation/calendar/compare(_:to:togranularity:).md)
- [isDate(_:equalTo:toGranularity:)](foundation/calendar/isdate(_:equalto:togranularity:).md)
- [isDate(_:inSameDayAs:)](foundation/calendar/isdate(_:insamedayas:).md)
- [isDateInToday(_:)](foundation/calendar/isdateintoday(_:).md)
- [isDateInTomorrow(_:)](foundation/calendar/isdateintomorrow(_:).md)
- [isDateInWeekend(_:)](foundation/calendar/isdateinweekend(_:).md)
