Package: effect
Module: DateTime
Add the given amount of unit’s to a DateTime.
The time zone is taken into account when adding days, weeks, months, and years.
Example
import { DateTime } from "effect"
// add 5 minutes
DateTime.unsafeMake(0).pipe(
DateTime.add({ minutes: 5 })
)
Signature
declare const add: { (parts: Partial<DateTime.PartsForMath>): <A extends DateTime>(self: A) => A; <A extends DateTime>(self: A, parts: Partial<DateTime.PartsForMath>): A; }
Since v3.6.0