ulid v0.1.0 Ulid.Time

Summary

Functions

Creates an identifier based on the time and the length provided

Functions

encode(time, output_size)

Creates an identifier based on the time and the length provided

Examples

A ten length character encoded result:

iex> Ulid.Time.encode 1469918176385, 10
"01ARYZ6S41"

A twelve length character encoded result:

iex> Ulid.Time.encode 1470264322240, 12
"0001AS99AA60"

A truncated result

iex> Ulid.Time.encode 1470118279201, 8
"AS4Y1E11"