@@ -437,17 +437,7 @@ public static long toNanos(Timestamp timestamp) {
437
437
checkedMultiply (timestamp .getSeconds (), NANOS_PER_SECOND ), timestamp .getNanos ());
438
438
}
439
439
440
- /**
441
- * Calculate the difference between two timestamps.
442
- *
443
- * <!-- MOE:begin_intracomment_strip -->
444
- * @deprecated Do not use this method for new code. Instead, convert to {@link java.time.Instant}
445
- * using {@link com.google.protobuf.util.JavaTimeConversions#toJavaInstant}, do the arithmetic
446
- * there, and convert back using {@link
447
- * com.google.protobuf.util.JavaTimeConversions#toProtoDuration}.
448
- * <!-- MOE:end_intracomment_strip -->
449
- */
450
- @ Deprecated // MOE:strip_line
440
+ /** Calculate the difference between two timestamps. */
451
441
public static Duration between (Timestamp from , Timestamp to ) {
452
442
checkValid (from );
453
443
checkValid (to );
@@ -456,18 +446,7 @@ public static Duration between(Timestamp from, Timestamp to) {
456
446
checkedSubtract (to .getNanos (), from .getNanos ()));
457
447
}
458
448
459
- /**
460
- * Add a duration to a timestamp.
461
- *
462
- * <!-- MOE:begin_intracomment_strip -->
463
- * @deprecated Do not use this method for new code. Instead, convert to {@link java.time.Instant}
464
- * and {@link java.time.Duration} using {@link
465
- * com.google.protobuf.util.JavaTimeConversions#toJavaInstant} and {@link
466
- * com.google.protobuf.util.JavaTimeConversions#toJavaDuration}, do the arithmetic there, and
467
- * convert back using {@link com.google.protobuf.util.JavaTimeConversions#toProtoTimestamp}.
468
- * <!-- MOE:end_intracomment_strip -->
469
- */
470
- @ Deprecated // MOE:strip_line
449
+ /** Add a duration to a timestamp. */
471
450
public static Timestamp add (Timestamp start , Duration length ) {
472
451
checkValid (start );
473
452
Durations .checkValid (length );
@@ -476,18 +455,7 @@ public static Timestamp add(Timestamp start, Duration length) {
476
455
checkedAdd (start .getNanos (), length .getNanos ()));
477
456
}
478
457
479
- /**
480
- * Subtract a duration from a timestamp.
481
- *
482
- * <!-- MOE:begin_intracomment_strip -->
483
- * @deprecated Do not use this method for new code. Instead, convert to {@link java.time.Instant}
484
- * and {@link java.time.Duration} using {@link
485
- * com.google.protobuf.util.JavaTimeConversions#toJavaInstant} and {@link
486
- * com.google.protobuf.util.JavaTimeConversions#toJavaDuration}, do the arithmetic there, and
487
- * convert back using {@link com.google.protobuf.util.JavaTimeConversions#toProtoTimestamp}.
488
- * <!-- MOE:end_intracomment_strip -->
489
- */
490
- @ Deprecated // MOE:strip_line
458
+ /** Subtract a duration from a timestamp. */
491
459
public static Timestamp subtract (Timestamp start , Duration length ) {
492
460
checkValid (start );
493
461
Durations .checkValid (length );
0 commit comments