AkiDate
A lightweight date utility library for Akinon applications. Wraps Day.js with built-in localization support and convenient parsing/formatting methods.
Installation
pnpm add @akinon/akidateBasic Usage
import { akidate } from '@akinon/akidate';
// Format an ISO date string
const formatted = akidate.formatIsoDate('2024-01-15T14:30:00.000Z', 'LL');
// Output: "January 15, 2024"
// Set locale for localized formatting
akidate.setLocale('tr');
const turkishDate = akidate.formatIsoDate('2024-01-15T14:30:00.000Z', 'LL');
// Output: "15 Ocak 2024"API Reference
setLocale
akidate.setLocale('tr');Parameter
Type
Description
Code
Language
formatIsoDate
Parameter
Type
Default
Description
Type
Description
Template
Example (en)
Description
toIsoDate
Parameter
Type
Description
Type
Description
parse
Parameter
Type
Description
Type
Description
Usage with Akilocale
Common Use Cases
Table Column Formatting
Form Date Handling
Date Comparison
Relative Time Calculation
Best Practices
Last updated
Was this helpful?

