Class XDateUtils

java.lang.Object
de.xima.fc.utils.XDateUtils

public class XDateUtils extends Object
Utility class for handling dates
Author:
XIMA MEDIA GmbH
  • Method Details

    • nowMinusDays

      public static final Date nowMinusDays(long days)
      Gets the date of the day that is the given number of days ago
      Parameters:
      days - Long number of days before now
      Returns:
      Date of the day that is the given number of days ago from now
    • nowMinusDuration

      public static final Date nowMinusDuration(Duration duration)
      Gets the date that is the given duration ago from now
      Parameters:
      duration - Duration time span before now
      Returns:
      Date of the day that is the given duration ago from now
    • startOfDay

      public static final Date startOfDay(Date date)
      Gets the very start of the given day
      Parameters:
      date - Date of the day
      Returns:
      Date the start of the goven day