Class DateUtil


  • public abstract class DateUtil
    extends Object
    • Constructor Detail

      • DateUtil

        public DateUtil()
    • Method Detail

      • isLeap

        public static int isLeap​(int y)
      • dateValidate

        public static boolean dateValidate​(int d,
                                           int m,
                                           int y)
      • NumberOfDays

        public static int NumberOfDays​(int d,
                                       int m,
                                       int y)
      • dateDifference

        public static long dateDifference​(String inputString1,
                                          String inputString2,
                                          String format)
      • dateObject

        public static Date dateObject​(String inputString,
                                      String format)
      • dateObject

        public static Date dateObject​(Object dateStr)
      • sqlDateObject

        public static Date sqlDateObject​(Object dateStr)
      • sqlDateTimeObject

        public static Date sqlDateTimeObject​(Object dateStr)
      • sqlTimestempObject

        public static Timestamp sqlTimestempObject​(Object dateStr)
      • currentDate

        public static Calendar currentDate​(int offSet)
      • currentDate

        public static Calendar currentDate()
      • currentSqlDate

        public static Date currentSqlDate()
      • currentUtilDate

        public static Date currentUtilDate()
      • offsetDate

        public static Calendar offsetDate​(Calendar workingDate,
                                          int offSet)
      • dateStringFormatted

        public static String dateStringFormatted​(Calendar date,
                                                 String dateFormat)
      • dateStringFormatted

        public static String dateStringFormatted​(Date date,
                                                 String dateFormat)
      • dateFileString

        public static String dateFileString​(Calendar calendar)
      • dateTimeString

        public static String dateTimeString​(Calendar calendar)
      • dateStringSTD

        public static String dateStringSTD​(Calendar calendar)
      • dateStringSTD1

        public static String dateStringSTD1​(Calendar calendar)
      • calenderForDate

        public static Calendar calenderForDate​(String date)
      • calenderForDate

        public static Calendar calenderForDate​(int year,
                                               int month,
                                               int day)
      • calenderForDate

        public static Calendar calenderForDate​(int year,
                                               int month,
                                               int day,
                                               int min)
      • differeceDays

        public static int differeceDays​(Calendar first,
                                        Calendar second)
      • getTime

        public static long getTime​(Object obj)
      • getyyyyMMMddDateString

        public static String getyyyyMMMddDateString()
      • getStandard1DateString

        public static String getStandard1DateString()
      • getFormattedCurrentDateTime

        public static String getFormattedCurrentDateTime​(String pattern)
      • getDateInAnotherFormat

        public static String getDateInAnotherFormat​(String dateString,
                                                    String inputPattern,
                                                    String outputPattern)
      • getDateForPattern

        public static Date getDateForPattern​(String dateString,
                                             String pattern)
      • getTodayBusiCal

        public static Calendar getTodayBusiCal()
      • getCalForDate

        public static Calendar getCalForDate​(Date date)
      • getCalForDate

        public static Calendar getCalForDate​(Date date,
                                             int noOfDaysAway)
      • getBusiCalForDate

        public static Calendar getBusiCalForDate​(Date date)
      • getBusiCalForDate

        public static Calendar getBusiCalForDate​(Date date,
                                                 int noOfDaysAway)
      • getBusiDateForDate

        public static Date getBusiDateForDate​(Date date,
                                              int noOfDaysAway)
      • getBusiSqlDateForCal

        public static Date getBusiSqlDateForCal​(Calendar cal)
      • getTodayBusiSqlDate

        public static Date getTodayBusiSqlDate()
      • getFirstDayOfMonthSqlDate

        public static Date getFirstDayOfMonthSqlDate()
      • getFirstDayOfYearSqlDate

        public static Date getFirstDayOfYearSqlDate()
      • getBusiGcXDaysAwayFromToday

        public static GregorianCalendar getBusiGcXDaysAwayFromToday​(int noOfDaysAway)
      • getBusiCalXDaysAwayFromToday

        public static Calendar getBusiCalXDaysAwayFromToday​(int noOfDaysAway)
      • getBusiSqlDateXDaysAwayFromToday

        public static Date getBusiSqlDateXDaysAwayFromToday​(int noOfDaysAway)
      • getNextHour

        public static Calendar getNextHour()
      • getNextMinute

        public static Calendar getNextMinute()
      • getNextDay

        public static Calendar getNextDay()
      • getDateStringForPattern

        public static String getDateStringForPattern​(Date date,
                                                     String pattern)
      • getOverLapInSeconds

        public static long getOverLapInSeconds​(Date startT1,
                                               Date endT1,
                                               Date startT2,
                                               Date endT2)
      • isOverlap

        public static boolean isOverlap​(Date startT1,
                                        Date endT1,
                                        Date startT2,
                                        Date endT2)
      • getOverlapInDays

        public static int getOverlapInDays​(Date startT1,
                                           Date endT1,
                                           Date startT2,
                                           Date endT2)
      • getOverLap

        public static long getOverLap​(long startT1,
                                      long endT1,
                                      long startT2,
                                      long endT2)
      • getOverLapInclEnds

        public static long getOverLapInclEnds​(long startT1,
                                              long endT1,
                                              long startT2,
                                              long endT2)
      • getOverlap

        public static int getOverlap​(int startT1,
                                     int endT1,
                                     int startT2,
                                     int endT2)
      • isDateOverlap

        public static boolean isDateOverlap​(Date startT1,
                                            Date endT1,
                                            Date startT2,
                                            Date endT2)