@@ -30,7 +30,7 @@ defmodule Calendar.ISO do
30
30
@ microseconds_per_second 1_000_000
31
31
32
32
@ doc """
33
- Returns the normalized Rata Die representation of the specified date.
33
+ Returns the `t:Calendar.iso_days` format of the specified date.
34
34
35
35
## Examples
36
36
@@ -51,7 +51,7 @@ defmodule Calendar.ISO do
51
51
end
52
52
53
53
@ doc """
54
- Converts a Rata Die to the datetime format specified by this calendar.
54
+ Converts the `t:Calendar.iso_days` format to the datetime format specified by this calendar.
55
55
56
56
## Examples
57
57
@@ -114,7 +114,7 @@ defmodule Calendar.ISO do
114
114
{ hours , minutes , seconds , { microseconds , 6 } }
115
115
end
116
116
117
- # Converts a year, month, day in only a count of days since the Rata Die epoch .
117
+ # Converts year, month, day to count of days since 0000-01-01 .
118
118
@ doc false
119
119
def date_to_iso_days_days ( 0 , 1 , 1 ) do
120
120
0
@@ -123,11 +123,10 @@ defmodule Calendar.ISO do
123
123
719528
124
124
end
125
125
def date_to_iso_days_days ( year , month , day ) do
126
- # Rata Die starts at year 1, rather than at year 0.
127
126
:calendar . date_to_gregorian_days ( year , month , day )
128
127
end
129
128
130
- # Calculates {year, month, day} from the count of days since the Rata Die epoch .
129
+ # Converts count of days since 0000-01-01 to {year, month, day} tuple .
131
130
@ doc false
132
131
def date_from_iso_days_days ( days ) do
133
132
:calendar . gregorian_days_to_date ( days )
0 commit comments