npm.io
10.6.0 • Published 3 months ago

@leancodepl/api-date

Licence
Apache-2.0
Version
10.6.0
Deps
0
Size
41 kB
Vulns
0
Weekly
0
Stars
4

@leancodepl/api-date

Type definitions for API date and time handling.

Installation

npm install @leancodepl/api-date
# or
yarn add @leancodepl/api-date

API

ApiDateOnly

Type representing date-only values for API communication.

ApiDateTime

Type representing date and time values for API communication.

ApiTimeSpan

Type representing time span values for API communication.

ApiTimeOnly

Type representing time-only values for API communication.

ApiDateTimeOffset

Type representing date and time with offset values for API communication.

Usage Examples

Type Definitions
import { ApiDateOnly, ApiDateTime, ApiTimeSpan, ApiTimeOnly, ApiDateTimeOffset } from "@leancodepl/api-date"

interface UserProfile {
  birthDate: ApiDateOnly
  createdAt: ApiDateTime
  sessionDuration: ApiTimeSpan
  preferredTime: ApiTimeOnly
  lastLogin: ApiDateTimeOffset
}

Keywords