aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/time/year.lux
blob: 85341eb24a102389b3d290c603a5684114072f9f (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
(.require
 [library
  [lux (.except and)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(.def .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [($.default /.there_is_no_year_0)
             ($.default /.value)
             ($.default /.epoch)
             ($.default /.leap)
             ($.default /.century)
             ($.default /.era)
             ($.default /.leap?)
             ($.default /.parser)
             ($.default /.equivalence)
             ($.default /.order)

             ($.documentation /.Year
               (format "A year in the gregorian calendar."
                       \n "Both negative (< 0) and positive (> 0) values are valid, but not 0."
                       \n "This is because the first year of the gregorian calendar was year 1."))

             ($.documentation /.year
               "A valid year in the gregorian calendar, if possible."
               [(year value)])

             ($.documentation /.days
               "The amount of days in a typical year.")

             ($.documentation /.Period
               "An amount of years.")

             ($.documentation /.leaps
               "The number of leap years in a period of years."
               [(leaps year)])

             ($.documentation /.codec
               (format "Based on ISO 8601."
                       \n "For example: 2017"))]
            []))