VOOZH about

URL: https://www.geeksforgeeks.org/java/offsettime-minusminutes-method-in-java-with-examples/

⇱ OffsetTime minusMinutes() method in Java with examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

OffsetTime minusMinutes() method in Java with examples

Last Updated : 31 Dec, 2018
The minusMinutes() method of OffsetTime class in Java returns a copy of this OffsetTime with the specified Minutes in the parameter getting subtracted. Syntax :
public OffsetTime minusMinutes(long Minutes)
Parameter: This method accepts a single parameter Minutes which the Minutes to be subtracted. It may be negative. Return Value: It returns a OffsetTime based on this time with the Minutes subtracted and it is not null. Below programs illustrate the minusMinutes() method: Program 1 :
Output:
After subtraction, time is: 11:05:10+05:05
Program 2 :
Output:
After subtraction, time is: 11:15:10+05:05
Reference: https://docs.oracle.com/javase/8/docs/api/java/time/OffsetTime.html#minusMinutes-long-
Comment