Aughtone Format is a suite of Kotlin Multiplatform libraries designed to provide consistent, localized formatting for Dates, Times, Numbers, and other human-readable metrics across all platforms.
Version 2.1.0 introduces significant structural changes and hardening:
-
Library Split: Metric-specific formatting (Ordinals, Durations, Relative Time, Data Sizes) has been moved from the core library into the new
:readablemodule. -
kotlin.timeHardening: All Duration and Relative Time APIs have been refactored to use standardkotlin.time.Durationtypes instead ofLongmilliseconds for improved type safety and consistency. - Version Synchronization: This release aligns the versioning across the Aughtone ecosystem.
-
:datetime: Advanced formatting forkotlinx-datetimetypes with multi-locale support. -
:readable: Human-friendly formatting for metrics (abbreviations), ordinals, and data sizes. -
:toolbox: Shared utilities and common formatting primitives.
This project follows a specialized 5-sector documentation hierarchy.
- 📐 Architecture: Engineering rules and design patterns.
- 🧠 Functional Specifications: Business logic and domain constraints.
- 🎨 Design & UI: Presentation layer and user stories.
- 📋 Acceptance Criteria: Success outcomes and verification.
- 📖 Developer Guide: Environment setup and onboarding.
- 📜 Changelog: History of changes and release notes.
- 65+ Languages Supported: Deep grammatical parity for Slavic, Arabic, Hebrew, Inuktitut, and more.
- Relative Time Formatting: Convert instants and dates into natural language (e.g., "5 minutes ago", "Yesterday").
- Automatic Fallback: Smartly switches from relative to absolute formatting based on configurable thresholds.
- Ordinal Numbers: Localized ordinal suffix support (e.g., 1st, 2nd, 3.º, 第1).
- Duration Scaling: Human-friendly duration strings with perceptual rounding (e.g., "2 weeks" vs "14 days").
- Numeric Abbreviations: Scaling large numbers into abbreviated forms (e.g., 1.5K, 1.2M).
- Geospatial Formatting: Localized altitude, azimuth (with cardinal directions), and coordinates.
The library provides deep grammatical parity for 65+ core languages and full BCP 47 subtag fallback (e.g., en-ZA → en).
val now = Clock.System.now()
// Format with styles (Short, Medium, Long, Full)
println(now.format(DateTimeStyle.Medium, locale = Locale("en"))) // "Apr 23, 2026, 4:15 PM"// Ordinals
println(123L.toReadableOrdinal(Locale("en"))) // "123rd"
// Durations
println(1.5.hours.toReadableString(Locale("en"))) // "1.5 hours"
// Relative Time
println(instant.readableRelative(locale = Locale.current)) // "3 minutes ago"
// Data Sizes
println(1048576L.toReadableDataSize()) // "1.0 MiB"Access the Governance Skills for specialized development rules.
This library includes embedded, machine-readable "skills" to enhance the experience of developers using AI code assistants. These skills help the AI understand our library's APIs and best practices, leading to more accurate and idiomatic code suggestions.
-
AI Skill Discovery: Look for
META-INF/ai-skills/*.ai-skill.md
Use this prompt to inform your AI assistant about the standards and patterns embedded in this library:
"Scan all project dependencies for AI Skill files located in
META-INF/ai-skills/with the prefixio.github.aughtone. Use these files to understand the coding standards, API patterns, and governance rules for the Aughtone Format library. If you cannot find them in the dependencies, refer to the Aughtone Format GitHub repository for the source definitions."
To learn how to add this capability to your own library, see our AI Skill Publishing Standard.