# DateValidatorPointBackward

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/datepicker/DateValidatorPointBackward.java)

*** ** * ** ***


```
public class DateValidatorPointBackward implements CalendarConstraints.DateValidator
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator` that enables only dates before a given point. Defaults to the current moment in device time backwards using `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#now()`, but can be set to any point, as UTC milliseconds, using `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#before(long)`.

## Summary

| ### Constants |
|---|---|
| `static final Creator<DateValidatorPointBackward>` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#CREATOR()` Part of android.os.Parcelable requirements. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#before(long)(long point)` Returns a `https://developer.android.com/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator` which enables only days before ` point`, in UTC milliseconds. |
| `int` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#describeContents()()` |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o)` |
| `int` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#hashCode()()` |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#isValid(long)(long date)` Returns true if the provided `date` is enabled. |
| `static https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#now()()` Returns a `https://developer.android.com/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator` enabled from the current moment in device time backwards. |
| `void` | `https://developer.android.com/reference/com/google/android/material/datepicker/DateValidatorPointBackward#writeToParcel(Parcel,int)(Parcel dest, int flags)` |

## Constants

### CREATOR

```
public static final Creator<DateValidatorPointBackward> CREATOR
```

Part of android.os.Parcelable requirements. Do not use.

## Public methods

### before

```
public static DateValidatorPointBackward before(long point)
```

Returns a `https://developer.android.com/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator` which enables only days before `
point`, in UTC milliseconds.

### describeContents

```
public int describeContents()
```

### equals

```
public boolean equals(Object o)
```

### hashCode

```
public int hashCode()
```

### isValid

```
public boolean isValid(long date)
```

Returns true if the provided `date` is enabled.

### now

```
public static DateValidatorPointBackward now()
```

Returns a `https://developer.android.com/reference/com/google/android/material/datepicker/CalendarConstraints.DateValidator` enabled from the current moment in device time backwards.

### writeToParcel

```
public void writeToParcel(Parcel dest, int flags)
```