cpdf-source/cpdfstrftime.mli

26 lines
565 B
OCaml
Raw Normal View History

(** C-style strftime *)
(** Supports the following format specifiers:
%a %A %b %B %s %e %H %I %j %m %M %p %S %T %u %w %Y %% *)
(** Our version of Unix's tm, so Unix not required *)
type t =
{_tm_sec : int;
_tm_min : int;
_tm_hour : int;
_tm_mday : int;
_tm_mon : int;
_tm_year : int;
_tm_wday : int;
_tm_yday : int;
_tm_isdst : bool}
2021-07-23 17:26:07 +02:00
(** Get the time now *)
2021-06-10 17:09:59 +02:00
val current_time : unit -> t
2021-07-23 17:26:07 +02:00
(** A dummy time value *)
val dummy : t
(** Strftime. If time omitted, the current time is used. *)
val strftime : ?time:t -> string -> string