aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/world/time/instant.lux
blob: 34d2243799006e2ee26d97b96ede7164f03a1c8b (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]]]]
 [\\library
  ["[0]" /]])

(def .public documentation
  (List $.Documentation)
  (list ($.module /._
                  "")

        ($.definition /.of_millis)
        ($.definition /.millis)
        ($.definition /.equivalence)
        ($.definition /.order)
        ($.definition /.enum)
        ($.definition /.date)
        ($.definition /.time)
        ($.definition /.day_of_week)

        ($.definition /.Instant
          "Instant is defined as milli-seconds since the epoch.")

        ($.definition /.span
          ""
          ($.example (span from to)))

        ($.definition /.after
          ""
          ($.example (after duration instant)))

        ($.definition /.relative
          ""
          ($.example (relative instant)))

        ($.definition /.absolute
          ""
          ($.example (absolute offset)))

        ($.definition /.epoch
          "The instant corresponding to 1970-01-01T00:00:00Z.")

        ($.definition /.codec
          (format "Based on ISO 8601."
                  \n "For example: 2017-01-15T21:14:51.827Z"))

        ($.definition /.now
          "Yields the current instant, as measured from the operating-system's clock.")

        ($.definition /.of_date_time
          ""
          ($.example (of_date_time date time)))
        ))