File: cpdfstrftime.mli

package info (click to toggle)
cpdf 2.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,828 kB
  • sloc: ml: 34,724; makefile: 65; sh: 45
file content (25 lines) | stat: -rw-r--r-- 565 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(** 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}

(** Get the time now *)
val current_time : unit -> t

(** A dummy time value *)
val dummy : t

(** Strftime. If time omitted, the current time is used. *)
val strftime : ?time:t -> string -> string