For AI agents: the complete documentation index is available at https://open-spaced-repetition.github.io/ts-fsrs/llms.txt, the full documentation bundle is available at https://open-spaced-repetition.github.io/ts-fsrs/llms-full.txt, and this page is available as Markdown at https://open-spaced-repetition.github.io/ts-fsrs/guide/chrono/numeric.md.

Numeric

numericChrono is useful for relative-time experiments: its normalize schema always returns previous: 0 and current: time, its now() returns 0, and it adds no card or revlog time fields. It does not track a card's last review. Do not pass Unix timestamps in milliseconds; supply elapsed days explicitly, or define a Chrono with persistent time fields for repeated reviews.

Try the preset

import { 
const numericChrono: Chrono<{
    readonly time: SRSSchema<{
        input: {};
        output: number;
    }>;
    readonly fields: {};
}>
numericChrono
} from 'ts-fsrs'
const
const clock: ChronoCore<number>
clock
=
const numericChrono: Chrono<{
    readonly time: SRSSchema<{
        input: {};
        output: number;
    }>;
    readonly fields: {};
}>
numericChrono
.
Chrono<{ readonly time: SRSSchema<{ input: {}; output: number; }>; readonly fields: {}; }>.create: () => ChronoCore<number>
create
()
console.log( JSON.stringify({ now:
const clock: ChronoCore<number>
clock
.
ChronoCore<number>.now: () => number
now
(),
elapsedDays:
const clock: ChronoCore<number>
clock
.
ChronoCore<number>.difference: (from: number, to: number) => number

Returns the distance from the previous review time to the current time.

difference
(1.25, 4.5),
nextTime:
const clock: ChronoCore<number>
clock
.
ChronoCore<number>.add: (from: number, days: number) => number
add
(4.5, 2.25),
normalize: StandardSchemaV1.Result<ChronoNormalizedTime<number>> | Promise<StandardSchemaV1.Result<ChronoNormalizedTime<number>>>
normalize
:
const numericChrono: Chrono<{
    readonly time: SRSSchema<{
        input: {};
        output: number;
    }>;
    readonly fields: {};
}>
numericChrono
.
Chrono<{ readonly time: SRSSchema<{ input: {}; output: number; }>; readonly fields: {}; }>.normalize: ChronoTimeNormalizer<{
    readonly time: SRSSchema<{
        input: {};
        output: number;
    }>;
    readonly fields: {};
}>
normalize
['~standard'].
StandardSchemaV1<Input = unknown, Output = Input>.Props<{ readonly time: number; }, ChronoNormalizedTime<number>>.validate: (value: unknown, options?: StandardSchemaV1<Input = unknown, Output = Input>.Options | undefined) => StandardSchemaV1.Result<ChronoNormalizedTime<number>> | Promise<StandardSchemaV1.Result<ChronoNormalizedTime<number>>>
validate
({ time: 4.5 }),
}) )

The arithmetic uses day values directly. Normalization still starts from zero, so a review time of 4.5 means 4.5 elapsed days, regardless of the previous card.