Skip to content

Commit

Permalink
More compact.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 1, 2024
1 parent aa25ebe commit 7e35870
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/plot.ml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
let format_timestamp f =
let buf = Buffer.create 0 in
let formatter = Format.formatter_of_buffer buf in
let timestamp = Option.get (Ptime.of_float_s f) in
Ptime.pp_human () formatter timestamp;
Format.pp_print_flush formatter ();
Buffer.contents buf
let (y, m, d), _ = Ptime.to_date_time timestamp in
Printf.sprintf "%d-%d-%d" (y+1) m d

let svg ?(margin = 100.) ~width ~height ?(abscissa = "") ?(ordinate = "") ?x_min
?x_max ?y_min ?y_max points =
Expand Down

0 comments on commit 7e35870

Please sign in to comment.