> 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.

# Temporal Instant

Configure `temporalInstantChrono` with `timezone` and `fractionalDays` directly in the scheduler config, for example `config: { ...modelConfig, timezone: 'Asia/Tokyo', fractionalDays: false }`. Both fields can be omitted to use defaults (`'UTC'` and `false`). Direct calls require the complete configuration: `temporalInstantChrono.create({ config: { timezone: 'Asia/Tokyo', fractionalDays: false } })`. Scheduler creation validates configuration and supplies defaults.

With `fractionalDays: false`, `difference` counts calendar days in the configured timezone. With `true`, it includes fractions of a day in that timezone. `add` uses fixed 24-hour days for UTC and calendar days for other timezones; across daylight-saving transitions, a local day can be shorter or longer than 24 hours. Fractional additions use the length of the adjacent local day. This preset does not implement a custom daily rollover hour.

## Run the preset

Install `temporal-polyfill` in your application. The example imports its global entry point before creating the Chrono; it installs Temporal in the executing runtime only when native Temporal is unavailable. The second import supplies global TypeScript declarations.


```sh [npm]
npm install temporal-polyfill
```

```sh [yarn]
yarn add temporal-polyfill
```

```sh [pnpm]
pnpm add temporal-polyfill
```

```sh [bun]
bun add temporal-polyfill
```

```sh [deno]
deno add npm:temporal-polyfill
```

```ts twoslash file="../../../snippets/run-code/chrono-temporal.ts"
import 'temporal-polyfill/global'
import 'temporal-polyfill/types/global'
import { temporalInstantChrono } from 'ts-fsrs'

const clock = temporalInstantChrono.create({
  config: { timezone: 'America/New_York', fractionalDays: false },
})
const fractionalClock = temporalInstantChrono.create({
  config: { timezone: 'America/New_York', fractionalDays: true },
})

// Noon in New York, the day before daylight saving time starts.
const from = Temporal.Instant.from('2026-03-07T17:00:00Z')
const next = clock.add(from, 1)
const halfDay = clock.add(from, 0.5)

console.log(
  JSON.stringify(
    {
      nextDayUTC: next.toString(),
      elapsedHours: from.until(next).total('hours'),
      calendarDays: clock.difference(from, next),
      fractionalDays: fractionalClock.difference(from, halfDay),
    },
    null,
    2
  )
)

```


▶ Run code

March 7 at noon in New York is 17:00 UTC. Adding one local calendar day reaches March 8 at noon, or 16:00 UTC: only 23 hours have elapsed because daylight saving time has started. `fractionalDays: true` measures the half-day addition as `0.5`.
