Package snap.util

Class DateUtils

java.lang.Object
snap.util.DateUtils

public class DateUtils extends Object
Some helper methods for Date.
  • Constructor Details

    • DateUtils

      public DateUtils()
  • Method Details

    • getYearsBetween

      public static int getYearsBetween(Date aDate1, Date aDate2)
      Returns the number of years between two dates.
    • getMonthsBetween

      public static int getMonthsBetween(Date aDate1, Date aDate2)
      Returns the number of months between two dates.
    • getAgeString

      public static String getAgeString(Date aDate1, Date aDate2)
      Returns an age string between two dates.
    • getCalendar

      public static Calendar getCalendar(Date aDate)
      Returns a calendar for given date.