@@ -1205,17 +1205,6 @@ impl Date32Type {
12051205}
12061206
12071207impl Date64Type {
1208- /// Converts an arrow Date64Type into a chrono::NaiveDate
1209- ///
1210- /// # Arguments
1211- ///
1212- /// * `i` - The Date64Type to convert
1213- #[ deprecated( since = "56.0.0" , note = "Use to_naive_date_opt instead." ) ]
1214- pub fn to_naive_date ( i : <Date64Type as ArrowPrimitiveType >:: Native ) -> NaiveDate {
1215- Self :: to_naive_date_opt ( i)
1216- . unwrap_or_else ( || panic ! ( "Date64Type::to_naive_date overflowed for date: {i}" , ) )
1217- }
1218-
12191208 /// Converts an arrow Date64Type into a chrono::NaiveDateTime if it fits in the range that chrono::NaiveDateTime can represent.
12201209 /// Returns `None` if the calculation would overflow or underflow.
12211210 ///
@@ -1241,25 +1230,6 @@ impl Date64Type {
12411230 d. sub ( epoch) . num_milliseconds ( ) as <Date64Type as ArrowPrimitiveType >:: Native
12421231 }
12431232
1244- /// Adds the given IntervalYearMonthType to an arrow Date64Type
1245- ///
1246- /// # Arguments
1247- ///
1248- /// * `date` - The date on which to perform the operation
1249- /// * `delta` - The interval to add
1250- #[ deprecated(
1251- since = "56.0.0" ,
1252- note = "Use `add_year_months_opt` instead, which returns an Option to handle overflow."
1253- ) ]
1254- pub fn add_year_months (
1255- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1256- delta : <IntervalYearMonthType as ArrowPrimitiveType >:: Native ,
1257- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1258- Self :: add_year_months_opt ( date, delta) . unwrap_or_else ( || {
1259- panic ! ( "Date64Type::add_year_months overflowed for date: {date}, delta: {delta}" , )
1260- } )
1261- }
1262-
12631233 /// Adds the given IntervalYearMonthType to an arrow Date64Type
12641234 ///
12651235 /// # Arguments
@@ -1278,25 +1248,6 @@ impl Date64Type {
12781248 Some ( Date64Type :: from_naive_date ( posterior) )
12791249 }
12801250
1281- /// Adds the given IntervalDayTimeType to an arrow Date64Type
1282- ///
1283- /// # Arguments
1284- ///
1285- /// * `date` - The date on which to perform the operation
1286- /// * `delta` - The interval to add
1287- #[ deprecated(
1288- since = "56.0.0" ,
1289- note = "Use `add_day_time_opt` instead, which returns an Option to handle overflow."
1290- ) ]
1291- pub fn add_day_time (
1292- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1293- delta : <IntervalDayTimeType as ArrowPrimitiveType >:: Native ,
1294- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1295- Self :: add_day_time_opt ( date, delta) . unwrap_or_else ( || {
1296- panic ! ( "Date64Type::add_day_time overflowed for date: {date}, delta: {delta:?}" , )
1297- } )
1298- }
1299-
13001251 /// Adds the given IntervalDayTimeType to an arrow Date64Type
13011252 ///
13021253 /// # Arguments
@@ -1316,25 +1267,6 @@ impl Date64Type {
13161267 Some ( Date64Type :: from_naive_date ( res) )
13171268 }
13181269
1319- /// Adds the given IntervalMonthDayNanoType to an arrow Date64Type
1320- ///
1321- /// # Arguments
1322- ///
1323- /// * `date` - The date on which to perform the operation
1324- /// * `delta` - The interval to add
1325- #[ deprecated(
1326- since = "56.0.0" ,
1327- note = "Use `add_month_day_nano_opt` instead, which returns an Option to handle overflow."
1328- ) ]
1329- pub fn add_month_day_nano (
1330- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1331- delta : <IntervalMonthDayNanoType as ArrowPrimitiveType >:: Native ,
1332- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1333- Self :: add_month_day_nano_opt ( date, delta) . unwrap_or_else ( || {
1334- panic ! ( "Date64Type::add_month_day_nano overflowed for date: {date}, delta: {delta:?}" , )
1335- } )
1336- }
1337-
13381270 /// Adds the given IntervalMonthDayNanoType to an arrow Date64Type
13391271 ///
13401272 /// # Arguments
@@ -1355,25 +1287,6 @@ impl Date64Type {
13551287 Some ( Date64Type :: from_naive_date ( res) )
13561288 }
13571289
1358- /// Subtract the given IntervalYearMonthType to an arrow Date64Type
1359- ///
1360- /// # Arguments
1361- ///
1362- /// * `date` - The date on which to perform the operation
1363- /// * `delta` - The interval to subtract
1364- #[ deprecated(
1365- since = "56.0.0" ,
1366- note = "Use `subtract_year_months_opt` instead, which returns an Option to handle overflow."
1367- ) ]
1368- pub fn subtract_year_months (
1369- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1370- delta : <IntervalYearMonthType as ArrowPrimitiveType >:: Native ,
1371- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1372- Self :: subtract_year_months_opt ( date, delta) . unwrap_or_else ( || {
1373- panic ! ( "Date64Type::subtract_year_months overflowed for date: {date}, delta: {delta}" , )
1374- } )
1375- }
1376-
13771290 /// Subtract the given IntervalYearMonthType to an arrow Date64Type
13781291 ///
13791292 /// # Arguments
@@ -1392,25 +1305,6 @@ impl Date64Type {
13921305 Some ( Date64Type :: from_naive_date ( posterior) )
13931306 }
13941307
1395- /// Subtract the given IntervalDayTimeType to an arrow Date64Type
1396- ///
1397- /// # Arguments
1398- ///
1399- /// * `date` - The date on which to perform the operation
1400- /// * `delta` - The interval to subtract
1401- #[ deprecated(
1402- since = "56.0.0" ,
1403- note = "Use `subtract_day_time_opt` instead, which returns an Option to handle overflow."
1404- ) ]
1405- pub fn subtract_day_time (
1406- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1407- delta : <IntervalDayTimeType as ArrowPrimitiveType >:: Native ,
1408- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1409- Self :: subtract_day_time_opt ( date, delta) . unwrap_or_else ( || {
1410- panic ! ( "Date64Type::subtract_day_time overflowed for date: {date}, delta: {delta:?}" , )
1411- } )
1412- }
1413-
14141308 /// Subtract the given IntervalDayTimeType to an arrow Date64Type
14151309 ///
14161310 /// # Arguments
@@ -1430,27 +1324,6 @@ impl Date64Type {
14301324 Some ( Date64Type :: from_naive_date ( res) )
14311325 }
14321326
1433- /// Subtract the given IntervalMonthDayNanoType to an arrow Date64Type
1434- ///
1435- /// # Arguments
1436- ///
1437- /// * `date` - The date on which to perform the operation
1438- /// * `delta` - The interval to subtract
1439- #[ deprecated(
1440- since = "56.0.0" ,
1441- note = "Use `subtract_month_day_nano_opt` instead, which returns an Option to handle overflow."
1442- ) ]
1443- pub fn subtract_month_day_nano (
1444- date : <Date64Type as ArrowPrimitiveType >:: Native ,
1445- delta : <IntervalMonthDayNanoType as ArrowPrimitiveType >:: Native ,
1446- ) -> <Date64Type as ArrowPrimitiveType >:: Native {
1447- Self :: subtract_month_day_nano_opt ( date, delta) . unwrap_or_else ( || {
1448- panic ! (
1449- "Date64Type::subtract_month_day_nano overflowed for date: {date}, delta: {delta:?}" ,
1450- )
1451- } )
1452- }
1453-
14541327 /// Subtract the given IntervalMonthDayNanoType to an arrow Date64Type
14551328 ///
14561329 /// # Arguments
0 commit comments