HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/date-fns/docs/constants.md
# Constants

date-fns provides with a number of useful constants.

## Usage

The constants could be imported from `date-fns/constants` or directly
from `date-fns`:

```js
import { maxTime } from 'date-fns/constants'
import { minTime } from 'date-fns'

function isAllowedTime(time) {
  return time <= maxTime && time >= minTime
}
```

## Constants

### `maxTime`

Maximum allowed time:

```js
import { maxTime } from 'date-fns'

const isValid = 8640000000000001 <= maxTime
//=> false

new Date(8640000000000001)
//=> Invalid Date
```

### `minTime`

Minimum allowed time:

```js
import { minTime } from 'date-fns'

const isValid = -8640000000000001 >= minTime
//=> false

new Date(-8640000000000001)
//=> Invalid Date
```