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