# @compute.ts/date

> Provide date operators for the computeTS package

Latest version **2.0.3** (published 2021-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @compute.ts/date
pnpm add @compute.ts/date
yarn add @compute.ts/date
bun add @compute.ts/date
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2021-06-26 |
| First published | 2021-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 60.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mathieu BERTHELLEMY |
| Maintainers | mberthellemy |
| Keywords | incremental computation, incremental engine, incremental calculation, incremental, computation, engine, calculation, mathematics, graph, dag, directed acyclic graph, affectation, evaluation, affect, eval |

## Links

- npm: https://www.npmjs.com/package/@compute.ts/date
- npm.io page: https://npm.io/package/@compute.ts/date

## Dependencies (4)

- [@compute.ts/core](https://npm.io/package/@compute.ts/core.md) ^2.0.0
- [@compute.ts/number](https://npm.io/package/@compute.ts/number.md) ^2.0.0
- [@compute.ts/string](https://npm.io/package/@compute.ts/string.md) ^2.0.0
- [@compute.ts/boolean](https://npm.io/package/@compute.ts/boolean.md) ^2.0.0

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2021-06-26
- 2.0.2 — 2021-06-25
- 2.0.1 — 2021-06-23
- 2.0.0 — 2021-06-21
- 1.0.5 — 2021-06-18
- 1.0.4 — 2021-06-18
- 1.0.3 — 2021-06-15
- 1.0.2 — 2021-06-14
- 1.0.1 — 2021-06-14

## README

![](https://colibri-engine.com/assets/img/compute.png)


![](https://img.shields.io/npm/types/@compute.ts/date)
![](https://img.shields.io/npm/v/@compute.ts/date)
![](https://img.shields.io/npm/l/@compute.ts/date)
![](https://img.shields.io/badge/coverage-99,23%25-4cc41f.svg)
![](https://img.shields.io/badge/files-7-orange)
![](https://img.shields.io/badge/lines-621-orange)
![](https://img.shields.io/badge/made%20in-France-blue)


## Presentation
The engine is based on incremental computation algorithms. When a calculation is submitted to the engine, all the computed values are memorized. So, if you change some variable and query an evaluation, the engine is able to compute the result very fast because it recomputes only what has changed.

[compute.ts](https://www.npmjs.com/package/compute.ts)

## Libraries
The project provides several libraries that each comes with dozens of operators. Please note the cross-compatibility of the libraries.
- [@compute.ts/boolean](https://www.npmjs.com/package/@compute.ts/boolean)
- [@compute.ts/number](https://www.npmjs.com/package/@compute.ts/number)
- [@compute.ts/string](https://www.npmjs.com/package/@compute.ts/string)
- [@compute.ts/dictionary](https://www.npmjs.com/package/@compute.ts/dictionary)
- [@compute.ts/function](https://www.npmjs.com/package/@compute.ts/function)
- [@compute.ts/array](https://www.npmjs.com/package/@compute.ts/array)
- [@compute.ts/math](https://www.npmjs.com/package/@compute.ts/math)
- [@compute.ts/structural](https://www.npmjs.com/package/@compute.ts/structural)



## Imports
### Typescript
```typescript
import {/* required operators */} from '@compute.ts/date';
````

### Javascript
```javascript
const {/* required operators */} = require('@compute.ts/date');
````
## Operators

### date

<code>date(value) ➜ x<sub>date</sub></code>

<code>date() ➜ x<sub>date</sub></code>

The **boolean** operator allows you to create a boolean expression which evals to the given value. If no value is provided the expression is a variable of the model

```typescript
import {date} from "@compute.ts/date"

const x = date(new Date('05/08/1992'));
x.affect(new Date('16/03/1996'))
```

* * *
### parseDate

<code>parseDate(x<sub>string</sub>) ➜ x<sub>date</sub></code>

The **parseDate** operator allows you to create a date expression which evals to the given value.

```typescript
import {parseDate} from "@compute.ts/date"

const x = parseDate('April 1, 1992');

const value = x.eval();
```

* * *

### isSame

<code>isSame(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isSame(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isSame** operator allows to create a boolean expression which evals the `true` if x is the same date as y

```typescript
import {date, isSame} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isSame(x, y) | x.isSame(y);

const value = z.eval();
```

* * *

### isNotSame

<code>isNotSame(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isNotSame(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isNotSame** operator allows to create a boolean expression which evals the `true` if x is not the same date as y

```typescript
import {date, isNotSame} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isNotSame(x, y) | x.isNotSame(y);

const value = z.eval();
```

* * *

### setDate

<code>setDate(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.setDate(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **setDay** operator allows to create a date expression which evals to x where the date has been changed

```typescript
import {number} from "@compute.ts/number";  
import {date, setDate} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = setDate(x, y) | x.setDate(y);

const value = z.eval();
```

* * *

### setMonth

<code>setMonth(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.setMonth(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **setMonth** operator allows to create a date expression which evals to x where the month has been changed

```typescript
import {number} from "@compute.ts/number";  
import {date, setMonth} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = setMonth(x, y) | x.setMonth(y);

const value = z.eval();
```

* * *

### setYear

<code>setYear(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.setYear(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **setYear** operator allows to create a date expression which evals to x where the year has been changed

```typescript
import {number} from "@compute.ts/number";  
import {date, setYear} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = setYear(x, y) | x.setYear(y);

const value = z.eval();
```

* * *

### addDay

<code>addDay(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.addDay(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **addDay** operator allows to create a date expression which evals the date x but y day(s) later

```typescript
import {number} from "@compute.ts/number";  
import {date, addDay} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = addDay(x, y) | x.addDay(y);

const value = z.eval();
```

* * *

### addMonth

<code>addMonth(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.addMonth(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **addMonth** operator allows to create a date expression which evals the date x but y month(s) later

```typescript
import {number} from "@compute.ts/number";  
import {date, addMonth} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = addMonth(x, y) | x.addMonth(y);

const value = z.eval();
```

* * *

### addYear

<code>addYear(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.addYear(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **addYear** operator allows to create a date expression which evals the date x but y year(s) later

```typescript
import {number} from "@compute.ts/number";  
import {date, addYear} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = addYear(x, y) | x.addYear(y);

const value = z.eval();
```

* * *

### minusDay

<code>minusDay(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.minusDay(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **minusDay** operator allows to create a date expression which evals the y day(s) before x

```typescript
import {number} from "@compute.ts/number";  
import {date, minusDay} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = minusDay(x, y) | x.minusDay(y);

const value = z.eval();
```

* * *

### minusMonth

<code>minusMonth(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.minusMonth(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **minusMonth** operator allows to create a date expression which evals the y month(s) before x

```typescript
import {number} from "@compute.ts/number";  
import {date, minusMonth} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = minusMonth(x, y) | x.minusMonth(y);

const value = z.eval();
```

²

* * *

### minusYear

<code>minusYear(x<sub>date</sub>, y<sub>number</sub>) ➜ z<sub>date</sub></code>  
<code>x<sub>date</sub>.minusYear(y<sub>number</sub>) ➜ z<sub>date</sub></code>

The **minusYear** operator allows to create a date expression which evals the y year(s) before x

```typescript
import {number} from "@compute.ts/number";  
import {date, minusYear} from "@compute.ts/date"

const x = date();  
const y = number();  
const z = minusYear(x, y) | x.minusYear(y);

const value = z.eval();
```

* * *

### getDay

<code>getDay(x<sub>date</sub>) ➜ y<sub>number</sub></code>  
<code>x<sub>date</sub>.getDay() ➜ y<sub>number</sub></code>

The **getDay** operator allows to create a date expression which evals the date of x (x ∈ \[0, 6\])

```typescript
import {date, getDay} from "@compute.ts/date"

const x = date();  
const y = getDay(x) | x.getDay();

const value = y.eval();
```

* * *

### getDate

<code>getDate(x<sub>date</sub>) ➜ y<sub>number</sub></code>  
<code>x<sub>date</sub>.getDate() ➜ y<sub>number</sub></code>

The **getDate** operator allows to create a date expression which evals the date of x (x ∈ \[0, 30\])

```typescript
import {date, getDate} from "@compute.ts/date"

const x = date();  
const y = getDate(x) | x.getDate();

const value = y.eval();
```

* * *

### getMonth

<code>getMonth(x<sub>date</sub>) ➜ y<sub>number</sub></code>  
<code>x<sub>date</sub>.getMonth() ➜ y<sub>number</sub></code>

The **getMonth** operator allows to create a date expression which evals the month of x (x ∈ \[0, 11\])

```typescript
import {date, getMonth} from "@compute.ts/date"

const x = date();  
const y = getMonth(x) | x.getMonth();

const value = y.eval();
```

* * *

### getYear

<code>getYear(x<sub>date</sub>) ➜ y<sub>number</sub></code>  
<code>x<sub>date</sub>.getYear() ➜ y<sub>number</sub></code>

The **getYear** operator allows to create a date expression which evals the year of x

```typescript
import {date, getYear} from "@compute.ts/date"

const x = date();  
const y = getYear(x) | x.getYear();

const value = y.eval();
```

* * *

### getWeek

<code>getWeek(x<sub>date</sub>) ➜ y<sub>number</sub></code>  
<code>x<sub>date</sub>.getWeek() ➜ y<sub>number</sub></code>

The **getWeek** operator allows to create a date expression which evals the week of x (x ∈ \[0, 51\])

```typescript
import {date, getWeek} from "@compute.ts/date"

const x = date();  
const y = getWeek(x) | x.getWeek();

const value = y.eval();
```

* * *

### toString

<code>toString(x<sub>date</sub>) ➜ z<sub>string</sub></code>  
<code>x<sub>date</sub>.toString() ➜ z<sub>string</sub></code>

```typescript
import {date, toString} from "@compute.ts/date"

const x = date();  
const y = toString(x) | x.toString();

const value = y.eval();
```

* * *

### isLeapYear

<code>isLeapYear(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isLeapYear() ➜ y<sub>boolean</sub></code>

The **isLeapYear** operator allows to create a boolean expression which evals the `true` if x a leap year

```typescript
import {date, isLeapYear} from "@compute.ts/date"

const x = date();  
const y = isLeapYear(x) | x.isLeapYear();

const value = y.eval();
```

* * *

### isWeekend

<code>isWeekend(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isWeekend() ➜ y<sub>boolean</sub></code>

The **isWeekEnd** operator allows to create a boolean expression which evals the `true` if x a weekend day

```typescript
import {date, isWeekend} from "@compute.ts/date"

const x = date();  
const y = isWeekend(x) | x.isWeekEnd();

const value = y.eval();
```

* * *

### isWeek

<code>isWeek(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isWeek() ➜ y<sub>boolean</sub></code>

The **isWeek** operator allows to create a boolean expression which evals the `true` if x is a week day

```typescript
import {date, isWeek} from "@compute.ts/date"

const x = date();  
const y = isWeek(x) | x.isWeek();

const value = y.eval();
```

* * *

### isMonday

<code>isMonday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isMonday() ➜ y<sub>boolean</sub></code>

The **isMonday** operator allows to create a boolean expression which evals the `true` if x is monday

```typescript
import {date, isMonday} from "@compute.ts/date"

const x = date();  
const y = isMonday(x) | x.isMonday();

const value = y.eval();
```

* * *

### isTuesday

<code>isTuesday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isTuesday() ➜ y<sub>boolean</sub></code>

The **isTuesday** operator allows to create a boolean expression which evals the `true` if x is in tuesday

```typescript
import {date, isTuesday} from "@compute.ts/date"

const x = date();  
const y = isTuesday(x) | x.isTuesday();

const value = y.eval();
```

* * *

### isWednesday

<code>isWednesday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isWednesday() ➜ y<sub>boolean</sub></code>

The **isWednesday** operator allows to create a boolean expression which evals the `true` if x is in wednesday

```typescript
import {date, isWednesday} from "@compute.ts/date"

const x = date();  
const y = isWednesday(x) | x.isWednesday();

const value = y.eval();
```

* * *

### isThursday

<code>isThursday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isThursday() ➜ y<sub>boolean</sub></code>

The **isThursday** operator allows to create a boolean expression which evals the `true` if x is thursday

```typescript
import {date, isThursday} from "@compute.ts/date"

const x = date();  
const y = isThursday(x) | x.isThursday();

const value = y.eval();
```

* * *

### isFriday

<code>isFriday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isFriday() ➜ y<sub>boolean</sub></code>

The **isFriday** operator allows to create a boolean expression which evals the `true` if x is friday

```typescript
import {date, isFriday} from "@compute.ts/date"

const x = date();  
const y = isFriday(x) | x.isFriday();

const value = y.eval();
```

* * *

### isSaturday

<code>isSaturday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isSaturday() ➜ y<sub>boolean</sub></code>

The **isSaturday** operator allows to create a boolean expression which evals the `true` if x is in saturday

```typescript
import {date, isSaturday} from "@compute.ts/date"

const x = date();  
const y = isSaturday(x) | x.isSaturday();

const value = y.eval();
```

* * *

### isSunday

<code>isSunday(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isSunday() ➜ y<sub>boolean</sub></code>

The **isSunday** operator allows to create a boolean expression which evals the `true` if x is sunday

```typescript
import {date, isSunday} from "@compute.ts/date"

const x = date();  
const y = isSunday(x) | x.isSunday();

const value = y.eval();
```

* * *

### isJanuary

<code>isJanuary(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isJanuary() ➜ y<sub>boolean</sub></code>

The **isJanuary** operator allows to create a boolean expression which evals the `true` if x is in january

```typescript
import {date, isJanuary} from "@compute.ts/date"

const x = date();  
const y = isJanuary(x) | x.isJanuary();

const value = y.eval();
```

* * *

### isFebuary

<code>isFebuary(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isFebuary() ➜ y<sub>boolean</sub></code>

The **isFebuary** operator allows to create a boolean expression which evals the `true` if x is in febuary

```typescript
import {date, isFebuary} from "@compute.ts/date"

const x = date();  
const y = isFebuary(x) | x.isFebuary();

const value = y.eval();
```

* * *

### isMarch

<code>isMarch(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isMarch() ➜ y<sub>boolean</sub></code>

The **isMarch** operator allows to create a boolean expression which evals the `true` if x is in march

```typescript
import {date, isMarch} from "@compute.ts/date"

const x = date();  
const y = isMarch(x) | x.isMarch();

const value = y.eval();
```

* * *

### isApril

<code>isApril(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isApril() ➜ y<sub>boolean</sub></code>

The **isApril** operator allows to create a boolean expression which evals the `true` if x is in april

```typescript
import {date, isApril} from "@compute.ts/date"

const x = date();  
const y = isApril(x) | x.isApril();

const value = y.eval();
```

* * *

### isMay

<code>isMay(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isMay() ➜ y<sub>boolean</sub></code>

The **isMay** operator allows to create a boolean expression which evals the `true` if x is in may

```typescript
import {date, isMay} from "@compute.ts/date"

const x = date();  
const y = isMay(x) | x.isMay();

const value = y.eval();
```

* * *

### isJune

<code>isJune(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isJune() ➜ y<sub>boolean</sub></code>

The **isJune** operator allows to create a boolean expression which evals the `true` if x is in june

```typescript
import {date, isJune} from "@compute.ts/date"

const x = date();  
const y = isJune(x) | x.isJune();

const value = y.eval();
```

* * *

### isJuly

<code>isJuly(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isJuly() ➜ y<sub>boolean</sub></code>

The **isJuly** operator allows to create a boolean expression which evals the `true` if x is in july

```typescript
import {date, isJuly} from "@compute.ts/date"

const x = date();  
const y = isJuly(x) | x.isJuly();

const value = y.eval();
```

* * *

### isAugust

<code>isAugust(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isAugust() ➜ y<sub>boolean</sub></code>

The **isAugust** operator allows to create a boolean expression which evals the `true` if x is in august

```typescript
import {date, isAugust} from "@compute.ts/date"

const x = date();  
const y = isAugust(x)| x.isAugust();

const value = y.eval();
```

* * *

### isSeptember

<code>isSeptember(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isSeptember() ➜ y<sub>boolean</sub></code>

The **isSeptember** operator allows to create a boolean expression which evals the `true` if x is in september

```typescript
import {date, isSeptember} from "@compute.ts/date"

const x = date();  
const y = isSeptember(x) | x.isSeptember();

const value = y.eval();
```

* * *

### isOctober

<code>isOctober(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isOctober() ➜ y<sub>boolean</sub></code>

The **isOctober** operator allows to create a boolean expression which evals the `true` if x is in october

```typescript
import {date, isOctober} from "@compute.ts/date"

const x = date();  
const y = isOctober(x) | x.isOctober();

const value = y.eval();
```

* * *

### isNovember

<code>isNovember(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isNovember() ➜ y<sub>boolean</sub></code>

The **isNovember** operator allows to create a boolean expression which evals the `true` if x is in november

```typescript
import {date, isNovember} from "@compute.ts/date"

const x = date();  
const y = isNovember(x) | x.isNovember();

const value = y.eval();
```

* * *

### isDecember

<code>isDecember(x<sub>date</sub>) ➜ y<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isDecember() ➜ y<sub>boolean</sub></code>

The **isDecember** operator allows to create a boolean expression which evals the `true` if x is in december

```typescript
import {date, isDecember} from "@compute.ts/date"

const x = date();  
const y = isDecember(x) | x.isDecember();

const value = y.eval();
```

* * *

### isBefore

<code>isBefore(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isBefore(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isBefore** operator allows to create a boolean expression which evals the `true` if x is before y

```typescript
import {date, isBefore} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isBefore(x, y) | x.isBefore(y);

const value = z.eval();
```

* * *

### isBeforeOrSame

<code>isBeforeOrSame(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isBeforeOrSame(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isBeforeOrSame** operator allows to create a boolean expression which evals the `true` if x is before or same as y

```typescript
import {date, isBeforeOrSame} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isBeforeOrSame(x, y) | x.isBeforeOrSame(y);

const value = z.eval();
```

* * *

### isAfter

<code>isAfter(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isAfter(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isAfter** operator allows to create a boolean expression which evals the `true` if x is after y

```typescript
import {date, isAfter} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isAfter(x, y) | x.isAfter(y);

const value = z.eval();
```

* * *

### isAfterOrSame

<code>isAfterOrSame(x<sub>date</sub>, y<sub>date</sub>) ➜ z<sub>boolean</sub></code>  
<code>x<sub>date</sub>.isAfterOrSame(y<sub>date</sub>) ➜ z<sub>boolean</sub></code>

The **isAfterOrSame** operator allows to create a boolean expression which evals the `true` if x is after or same as y

```typescript
import {date, isAfterOrSame} from "@compute.ts/date"

const x = date();  
const y = date();  
const z = isAfterOrSame(x, y) | x.isAfterOrSame(y);

const value = z.eval();
```


## About the author
I am a software developer with 4 years of project specializing in the development of web solutions. Digital Nomad, I work while traveling.  After 3 years into the french industry, I've started to work as a freelance software architect or fullstack developer.

Based on state-of-the-art web technologies, I offer you to architect & develop the best version of your project. My experience in the web app development assure you to build a nice looking, performant and stable product.

Minimalist, I like to travel, to meet people, learn new things and handmade stuff. Scuba & sky diving licenced. I like also hamburgers, Kinder chocolate and crepes. Karate black belt.

https://berthellemy.com/

* * *

![](https://colibri-engine.com/assets/img/brand/logo_animated.gif)

---
_Source: https://npm.io/package/@compute.ts/date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
