Java tutorial
import java.time.Period; public class Main { public static void main(String[] args) { Period p1 = Period.of(2, 3, 5); Period p2 = Period.of(1, 15, 28); System.out.println(p1); System.out.println(p2); System.out.println(p1.minus(p2)); System.out.println(p1.plus(p2)); System.out.println(p1.plus(p2).normalized()); } }