Here you can find the source of getDiffYear(java.sql.Timestamp start, java.sql.Timestamp end)
Parameter | Description |
---|---|
start | the start |
end | the end |
public static int getDiffYear(java.sql.Timestamp start, java.sql.Timestamp end)
//package com.java2s; //License from project: Apache License public class Main { /**// w w w . j av a2 s . c o m * Gets the diff year. * * @param start the start * @param end the end * @return the diff year */ public static int getDiffYear(java.sql.Timestamp start, java.sql.Timestamp end) { return end.getYear() - start.getYear(); } }