diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-28 09:48:49 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-28 09:48:49 -0700 |
| commit | f43c41dcf56a30f3fac0de07349b2c505203c380 (patch) | |
| tree | 2d2e228a2dd1cd489927cfec547494a433bded42 /lib/models/snowflake.mli | |
| parent | Fix Message.t.mentions (diff) | |
| download | disml-f43c41dcf56a30f3fac0de07349b2c505203c380.tar.xz disml-f43c41dcf56a30f3fac0de07349b2c505203c380.zip | |
Add more docs
Diffstat (limited to 'lib/models/snowflake.mli')
| -rw-r--r-- | lib/models/snowflake.mli | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/models/snowflake.mli b/lib/models/snowflake.mli index a6d42b5..e7f6be3 100644 --- a/lib/models/snowflake.mli +++ b/lib/models/snowflake.mli @@ -2,5 +2,11 @@ open Core type t = Int.t [@@deriving sexp, yojson] +(** Convert a snowflake into a {!Core.Time.t} *) +val time_of_t : t -> Time.t + +(** Convert a snowflake into a Unix timestamp. Millisecond precision. *) val timestamp : t -> int + +(** Convert a snowflake into an ISO8601 timestamp string. This is equivalent to calling [Snowflake.time_of_t snowflake |> Time.(to_string_iso8601_basic ~zone:Zone.utc)] *) val timestamp_iso : t -> string
\ No newline at end of file |