@@ -6,12 +6,12 @@ use crate::cal::iso::{IsoDateInner, IsoEra};
6
6
use crate :: calendar_arithmetic:: {
7
7
ArithmeticDate , ArithmeticDateBuilder , CalendarArithmetic , DateFieldsResolver ,
8
8
} ;
9
- use crate :: duration:: { DateAddOptions , DateUntilOptions } ;
10
9
use crate :: error:: DateError ;
11
10
use crate :: options:: DateFromFieldsOptions ;
11
+ use crate :: options:: { DateAddOptions , DateUntilOptions } ;
12
12
use crate :: preferences:: CalendarAlgorithm ;
13
13
use crate :: types:: EraYear ;
14
- use crate :: { types, Calendar , DateDuration , RangeError } ;
14
+ use crate :: { types, Calendar , RangeError } ;
15
15
use calendrical_calculations:: helpers:: I32CastError ;
16
16
use calendrical_calculations:: rata_die:: RataDie ;
17
17
@@ -155,7 +155,12 @@ impl<Y: GregorianYears> Calendar for AbstractGregorian<Y> {
155
155
date. days_in_month ( )
156
156
}
157
157
158
- fn add ( & self , date : & Self :: DateInner , duration : DateDuration , options : DateAddOptions ) -> Result < Self :: DateInner , DateError > {
158
+ fn add (
159
+ & self ,
160
+ date : & Self :: DateInner ,
161
+ duration : types:: DateDuration ,
162
+ options : DateAddOptions ,
163
+ ) -> Result < Self :: DateInner , DateError > {
159
164
date. added ( duration, & AbstractGregorian ( IsoEra ) , options)
160
165
}
161
166
@@ -164,7 +169,7 @@ impl<Y: GregorianYears> Calendar for AbstractGregorian<Y> {
164
169
date1 : & Self :: DateInner ,
165
170
date2 : & Self :: DateInner ,
166
171
options : DateUntilOptions ,
167
- ) -> Result < DateDuration , Self :: UntilError > {
172
+ ) -> Result < types :: DateDuration , Self :: UntilError > {
168
173
Ok ( date1. until ( date2, & AbstractGregorian ( IsoEra ) , options) )
169
174
}
170
175
@@ -263,19 +268,27 @@ macro_rules! impl_with_abstract_gregorian {
263
268
crate :: cal:: abstract_gregorian:: AbstractGregorian ( $eras_expr) . days_in_month( & date. 0 )
264
269
}
265
270
266
- fn add( & self , date: & Self :: DateInner , duration: crate :: duration:: DateDuration , options: crate :: duration:: DateAddOptions ) -> Result <Self :: DateInner , DateError > {
271
+ fn add(
272
+ & self ,
273
+ date: & Self :: DateInner ,
274
+ duration: crate :: types:: DateDuration ,
275
+ options: crate :: options:: DateAddOptions ,
276
+ ) -> Result <Self :: DateInner , DateError > {
267
277
let $self_ident = self ;
268
- crate :: cal:: abstract_gregorian:: AbstractGregorian ( $eras_expr) . add( & date. 0 , duration, options) . map( $inner_date_ty)
278
+ crate :: cal:: abstract_gregorian:: AbstractGregorian ( $eras_expr)
279
+ . add( & date. 0 , duration, options)
280
+ . map( $inner_date_ty)
269
281
}
270
282
271
283
fn until(
272
284
& self ,
273
285
date1: & Self :: DateInner ,
274
286
date2: & Self :: DateInner ,
275
- options: crate :: duration :: DateUntilOptions ,
276
- ) -> Result <crate :: duration :: DateDuration , Self :: UntilError > {
287
+ options: crate :: options :: DateUntilOptions ,
288
+ ) -> Result <crate :: types :: DateDuration , Self :: UntilError > {
277
289
let $self_ident = self ;
278
- crate :: cal:: abstract_gregorian:: AbstractGregorian ( $eras_expr) . until( & date1. 0 , & date2. 0 , options)
290
+ crate :: cal:: abstract_gregorian:: AbstractGregorian ( $eras_expr)
291
+ . until( & date1. 0 , & date2. 0 , options)
279
292
}
280
293
281
294
fn year_info( & self , date: & Self :: DateInner ) -> Self :: Year {
0 commit comments