title: Core.z. Zod Date

A2A Node SDK - v0.1.0 / Modules / Core / z / ZodDate

Class: ZodDate

Core.z.ZodDate

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ZodDate(def): ZodDate

Parameters

NameType
defZodDateDef

Returns

ZodDate

Inherited from

ZodType.constructor

Properties

_def

Readonly _def: ZodDateDef

Inherited from

ZodType._def


_input

Readonly _input: Date

Inherited from

ZodType._input


_output

Readonly _output: Date

Inherited from

ZodType._output


_type

Readonly _type: Date

Inherited from

ZodType._type


create

Static create: (params?: { description?: string ; errorMap?: ZodErrorMap ; invalid_type_error?: string ; message?: string ; required_error?: string } & { coerce?: boolean }) => ZodDate

Type declaration

▸ (params?): ZodDate

Parameters
NameType
params?{ description?: string ; errorMap?: ZodErrorMap ; invalid_type_error?: string ; message?: string ; required_error?: string } & { coerce?: boolean }
Returns

ZodDate


spa

spa: (data: unknown, params?: InexactPartial<ParseParams>) => Promise<SafeParseReturnType<Date, Date>>

Alias of safeParseAsync

Type declaration

▸ (data, params?): Promise<SafeParseReturnType<Date, Date>>

Parameters
NameType
dataunknown
params?InexactPartial<ParseParams>
Returns

Promise<SafeParseReturnType<Date, Date>>

Inherited from

ZodType.spa


~standard

~standard: Props<Date, Date>

Inherited from

ZodType.~standard

Accessors

description

get description(): undefined | string

Returns

undefined | string

Inherited from

ZodType.description


maxDate

get maxDate(): null | Date

Returns

null | Date


minDate

get minDate(): null | Date

Returns

null | Date

Methods

_addCheck

_addCheck(check): ZodDate

Parameters

NameType
checkZodDateCheck

Returns

ZodDate


_getOrReturnCtx

_getOrReturnCtx(input, ctx?): ParseContext

Parameters

NameType
inputParseInput
ctx?ParseContext

Returns

ParseContext

Inherited from

ZodType._getOrReturnCtx


_getType

_getType(input): string

Parameters

NameType
inputParseInput

Returns

string

Inherited from

ZodType._getType


_parse

_parse(input): ParseReturnType<Date>

Parameters

NameType
inputParseInput

Returns

ParseReturnType<Date>

Overrides

ZodType._parse


_parseAsync

_parseAsync(input): AsyncParseReturnType<Date>

Parameters

NameType
inputParseInput

Returns

AsyncParseReturnType<Date>

Inherited from

ZodType._parseAsync


_parseSync

_parseSync(input): SyncParseReturnType<Date>

Parameters

NameType
inputParseInput

Returns

SyncParseReturnType<Date>

Inherited from

ZodType._parseSync


_processInputParams

_processInputParams(input): Object

Parameters

NameType
inputParseInput

Returns

Object

NameType
ctxParseContext
statusParseStatus

Inherited from

ZodType._processInputParams


_refinement

_refinement(refinement): ZodEffects<ZodDate, Date, Date>

Parameters

NameType
refinement(arg: Date, ctx: RefinementCtx) => any

Returns

ZodEffects<ZodDate, Date, Date>

Inherited from

ZodType._refinement


and

and<T>(incoming): ZodIntersection<ZodDate, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
incomingT

Returns

ZodIntersection<ZodDate, T>

Inherited from

ZodType.and


array

array(): ZodArray<ZodDate, "many">

Returns

ZodArray<ZodDate, "many">

Inherited from

ZodType.array


brand

brand<B>(brand?): ZodBranded<ZodDate, B>

Type parameters

NameType
Bextends string | number | symbol

Parameters

NameType
brand?B

Returns

ZodBranded<ZodDate, B>

Inherited from

ZodType.brand


catch

catch(def): ZodCatch<ZodDate>

Parameters

NameType
defDate

Returns

ZodCatch<ZodDate>

Inherited from

ZodType.catch

catch(def): ZodCatch<ZodDate>

Parameters

NameType
def(ctx: { error: ZodError<any> ; input: Date }) => Date

Returns

ZodCatch<ZodDate>

Inherited from

ZodType.catch


default

default(def): ZodDefault<ZodDate>

Parameters

NameType
defDate

Returns

ZodDefault<ZodDate>

Inherited from

ZodType.default

default(def): ZodDefault<ZodDate>

Parameters

NameType
def() => Date

Returns

ZodDefault<ZodDate>

Inherited from

ZodType.default


describe

describe(description): this

Parameters

NameType
descriptionstring

Returns

this

Inherited from

ZodType.describe


isNullable

isNullable(): boolean

Returns

boolean

Inherited from

ZodType.isNullable


isOptional

isOptional(): boolean

Returns

boolean

Inherited from

ZodType.isOptional


max

max(maxDate, message?): ZodDate

Parameters

NameType
maxDateDate
message?ErrMessage

Returns

ZodDate


min

min(minDate, message?): ZodDate

Parameters

NameType
minDateDate
message?ErrMessage

Returns

ZodDate


nullable

nullable(): ZodNullable<ZodDate>

Returns

ZodNullable<ZodDate>

Inherited from

ZodType.nullable


nullish

nullish(): ZodOptional<ZodNullable<ZodDate>>

Returns

ZodOptional<ZodNullable<ZodDate>>

Inherited from

ZodType.nullish


optional

optional(): ZodOptional<ZodDate>

Returns

ZodOptional<ZodDate>

Inherited from

ZodType.optional


or

or<T>(option): ZodUnion<[ZodDate, T]>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
optionT

Returns

ZodUnion<[ZodDate, T]>

Inherited from

ZodType.or


parse

parse(data, params?): Date

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Date

Inherited from

ZodType.parse


parseAsync

parseAsync(data, params?): Promise<Date>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<Date>

Inherited from

ZodType.parseAsync


pipe

pipe<T>(target): ZodPipeline<ZodDate, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
targetT

Returns

ZodPipeline<ZodDate, T>

Inherited from

ZodType.pipe


promise

promise(): ZodPromise<ZodDate>

Returns

ZodPromise<ZodDate>

Inherited from

ZodType.promise


readonly

readonly(): ZodReadonly<ZodDate>

Returns

ZodReadonly<ZodDate>

Inherited from

ZodType.readonly


refine

refine<RefinedOutput>(check, message?): ZodEffects<ZodDate, RefinedOutput, Date>

Type parameters

NameType
RefinedOutputextends Date

Parameters

NameType
check(arg: Date) => arg is RefinedOutput
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: Date) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodDate, RefinedOutput, Date>

Inherited from

ZodType.refine

refine(check, message?): ZodEffects<ZodDate, Date, Date>

Parameters

NameType
check(arg: Date) => unknown
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: Date) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodDate, Date, Date>

Inherited from

ZodType.refine


refinement

refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodDate, RefinedOutput, Date>

Type parameters

NameType
RefinedOutputextends Date

Parameters

NameType
check(arg: Date) => arg is RefinedOutput
refinementDataIssueData | (arg: Date, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodDate, RefinedOutput, Date>

Inherited from

ZodType.refinement

refinement(check, refinementData): ZodEffects<ZodDate, Date, Date>

Parameters

NameType
check(arg: Date) => boolean
refinementDataIssueData | (arg: Date, ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodDate, Date, Date>

Inherited from

ZodType.refinement


safeParse

safeParse(data, params?): SafeParseReturnType<Date, Date>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

SafeParseReturnType<Date, Date>

Inherited from

ZodType.safeParse


safeParseAsync

safeParseAsync(data, params?): Promise<SafeParseReturnType<Date, Date>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<SafeParseReturnType<Date, Date>>

Inherited from

ZodType.safeParseAsync


superRefine

superRefine<RefinedOutput>(refinement): ZodEffects<ZodDate, RefinedOutput, Date>

Type parameters

NameType
RefinedOutputextends Date

Parameters

NameType
refinement(arg: Date, ctx: RefinementCtx) => arg is RefinedOutput

Returns

ZodEffects<ZodDate, RefinedOutput, Date>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodDate, Date, Date>

Parameters

NameType
refinement(arg: Date, ctx: RefinementCtx) => void

Returns

ZodEffects<ZodDate, Date, Date>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodDate, Date, Date>

Parameters

NameType
refinement(arg: Date, ctx: RefinementCtx) => Promise<void>

Returns

ZodEffects<ZodDate, Date, Date>

Inherited from

ZodType.superRefine


transform

transform<NewOut>(transform): ZodEffects<ZodDate, NewOut, Date>

Type parameters

Name
NewOut

Parameters

NameType
transform(arg: Date, ctx: RefinementCtx) => NewOut | Promise<NewOut>

Returns

ZodEffects<ZodDate, NewOut, Date>

Inherited from

ZodType.transform


~validate

~validate(data): Result<Date> | Promise<Result<Date>>

Parameters

NameType
dataunknown

Returns

Result<Date> | Promise<Result<Date>>

Inherited from

ZodType.~validate