The DateStream is a Stream that provides date-related methods.
Returns a DateStream that adds milliseconds to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addMilliseconds(10);
console.log(stream.single());
// now + 10 millisecondsReturns a DateStream that subtracts milliseconds from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractMilliseconds(10);
console.log(stream.single());
// now - 10 millisecondsReturns a DateStream that sets the milliseconds of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setMilliseconds(10);
console.log(stream.single());
// now with milliseconds is 10Returns a NumberStream with the milliseconds parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getMilliseconds();
console.log(stream.single());
// milliseconds part of the nowReturns a DateStream that adds seconds to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addSeconds(10);
console.log(stream.single());
// now + 10 secondsReturns a DateStream that subtracts seconds from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractSeconds(10);
console.log(stream.single());
// now - 10 secondsReturns a DateStream that sets the seconds of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setSeconds(10);
console.log(stream.single());
// now with seconds is 10Returns a NumberStream with the seconds parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getSeconds();
console.log(stream.single());
// seconds part of the nowReturns a DateStream that adds hours to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addHours(10);
console.log(stream.single());
// now + 10 hoursReturns a DateStream that subtracts hours from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractHours(10);
console.log(stream.single());
// now - 10 hoursReturns a DateStream that sets the hours of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setHours(10);
console.log(stream.single());
// now with hours is 10Returns a NumberStream with the hours parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getHours();
console.log(stream.single());
// hours part of the nowReturns a DateStream that adds days to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addDays(10);
console.log(stream.single());
// now + 10 daysReturns a DateStream that subtracts days from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractDays(10);
console.log(stream.single());
// now - 10 daysReturns a DateStream that sets the days of month of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setDaysOfMonth(10);
console.log(stream.single());
// now with days of month is 10Returns a DateStream that sets the days of week of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setDaysOfWeek(2);
console.log(stream.single());
// now with days of week is 2Returns a NumberStream with the days of month parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getDaysOfMonth();
console.log(stream.single());
// days of month part of the nowReturns a NumberStream with the days of week parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getDaysOfWeek();
console.log(stream.single());
// days of week part of the nowReturns a DateStream that adds months to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addMonths(10);
console.log(stream.single());
// now + 10 monthsReturns a DateStream that subtracts months from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractMonths(10);
console.log(stream.single());
// now - 10 monthsReturns a DateStream that sets the months of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setMonths(10);
console.log(stream.single());
// now with months is 10Returns a NumberStream with the months parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getMonths();
console.log(stream.single());
// months part of the nowReturns a DateStream that adds years to the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().addYears(10);
console.log(stream.single());
// now + 10 yearsReturns a DateStream that subtracts years from the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().subtractYears(10);
console.log(stream.single());
// now - 10 yearsReturns a DateStream that sets the years of the produced output.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
Integer |
value |
import { now } from '@fluentfixture/core';
const stream = now().setYears(10);
console.log(stream.single());
// now with years is 10Returns a NumberStream with the years parts of the produced output.
import { now } from '@fluentfixture/core';
const stream = now().getYears();
console.log(stream.single());
// years part of the now