@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
16 lines (13 loc) • 381 B
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
export function constDateTime(
val: string,
): z.ZodType<string, z.ZodTypeDef, unknown> {
return z.custom<string>((v) => {
return (
typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
);
}, `Value must be equivalent to ${val}`);
}