Core date and time types for API serialization
npm install @leancodepl/api-dateType definitions for API date and time handling.
``bash`
npm install @leancodepl/api-dateor
yarn add @leancodepl/api-date
Type representing date-only values for API communication.
Type representing date and time values for API communication.
Type representing time span values for API communication.
Type representing time-only values for API communication.
Type representing date and time with offset values for API communication.
`typescript
import { ApiDateOnly, ApiDateTime, ApiTimeSpan, ApiTimeOnly, ApiDateTimeOffset } from "@leancodepl/api-date"
interface UserProfile {
birthDate: ApiDateOnly
createdAt: ApiDateTime
sessionDuration: ApiTimeSpan
preferredTime: ApiTimeOnly
lastLogin: ApiDateTimeOffset
}
``