---
title: "Epsilon Formatter"
canonical_url: "https://apidocs.sportradar.com/resources/epsilon-sdk/docs/modules/formatter"
markdown_url: "https://apidocs.sportradar.com/resources/epsilon-sdk/docs/modules/formatter.md"
last_updated: "2026-06-15T10:09:12Z"
---

# Epsilon Formatter

The `epsilon-formatter` module provides Kotlin Multiplatform utilities for formatting dates, numbers, and strings using platform-specific implementations (e.g., `java.text` and `java.time` on JVM/Android and `Foundation` on iOS).

> **Tip**
>
> Use this module when shared code needs platform-consistent formatting behavior without adding separate formatter implementations per target.

## Features

- **Date & Time Formatting**: Format Unix timestamps into localized strings without external library dependencies.
- **Locale Support**: Multiplatform locale handling via `CommonLocale` which is typealiased to platform specific classes.
- **Currency Formatting**: Localized currency notation with support for precision, symbols, and ISO codes.

## Supported Platforms

- Android
- iOS
- JVM

## Key Components

### Formatter

The core utility class for performing various formatting operations. It uses platform-specific logic to ensure that formatting matches the user's expectations on each OS.

**Formatter example**

```kotlin
// Format a Unix timestamp to UTC time string
val timeString = Formatter.dateTime(
    format = DateTimeFormat.TimeHoursMinutes,
    unixMillisTimestamp = 1715856000000L
)
```

### DateTimeFormat

Constants and utilities for common date and time patterns.

| Format                     | Pattern                 |
| :------------------------- | :---------------------- |
| `DateISO`                  | `yyyy-MM-dd`            |
| `DateTimeISO`              | `yyyy-MM-dd'T'HH:mm:ss` |
| `TimeHoursMinutes`         | `HH:mm`                 |
| `TimeHoursMinutesMeridiem` | `h:mm a`                |

> **Note**
>
> Other patterns can be implemented in consumer projects by extending the `Format` interface.

## Usage

Add the dependency to your `commonMain`:

```kotlin
dependencies {
    implementation("ag.sportradar.mobile.epsilon:epsilon-formatter:<version>")
}
```
