Returns the previous day.

@return Day before this one. In case of {@link #PH} {@literal null} is returned.
558746
public DayOfTheWeek previous() {
        if (this == PH) {
            return null;
        }
        final int nextId = id - 1;
        for (final DayOfTheWeek dow : ALL) {
            if (dow.id == nextId) {
                return dow;
            }
        }
        return SUN;
    }
995316
public static Date getFirstDayFromCurrentYear(Date d) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);                        
        cal.set(Calendar.MONTH, Calendar.JANUARY);
        cal.set(Calendar.DAY_OF_MONTH, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
772398
public static int yesterday() {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DAY_OF_YEAR, -1);
        return cal.get(Calendar.YEAR) * 10000 + (cal.get(Calendar.MONTH) + 1) * 100 + cal.get(Calendar.DAY_OF_MONTH);
    }
119220
static boolean isBefore(Date a, Date b) {
        return a == null || (b != null && b.before(a));
    }
584171
public static Date getFirstDayFromLastMonth(Date d) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);                
        cal.add(Calendar.MONTH, -1);
        cal.set(Calendar.DAY_OF_MONTH, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
492582
public Date getBirthdayAsDate() {
    if (isBlank(getBirthday()) || getBirthday().split("/").length < 2) {
      return null;
    }

    return toDateFromShortFormat(birthday);
  }
661050
@Nullable
  public Date getTimeOfDayForDate (final Date dateTime)
  {
    if (dateTime == null)
      return null;
    final Calendar cal = PDTFactory.createCalendar ();
    cal.setTime (dateTime);
    cal.set (Calendar.HOUR_OF_DAY, m_nHour);
    cal.set (Calendar.MINUTE, m_nMinute);
    cal.set (Calendar.SECOND, m_nSecond);
    cal.clear (Calendar.MILLISECOND);
    return cal.getTime ();
  }
127557
public static Date getNextDay() {

        Calendar cal = GregorianCalendar.getInstance();
        return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH),
                                        cal.get(Calendar.DAY_OF_MONTH) + 1).getTime();

    }
1073963
public boolean before (final TimeOfDay timeOfDay)
  {
    if (timeOfDay.m_nHour > m_nHour)
      return true;
    if (timeOfDay.m_nHour < m_nHour)
      return false;

    if (timeOfDay.m_nMinute > m_nMinute)
      return true;
    if (timeOfDay.m_nMinute < m_nMinute)
      return false;

    if (timeOfDay.m_nSecond > m_nSecond)
      return true;
    if (timeOfDay.m_nSecond < m_nSecond)
      return false;

    return false; // must be equal...
  }
986179
public static int[] today() {
        Calendar today = Calendar.getInstance();
        int year = today.get(Calendar.YEAR);
        int month = today.get(Calendar.MONTH) + 1;
        int date = today.get(Calendar.DATE);
        return calElement(year, month, date);
    }
1028370
public static Date getFirstDayFromCurrentWeek(Date d) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(d);        
        cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
1361906
private function getClosestDayBefore($dayNumber)
    {
        if (null !== $day = $this->getDay($dayNumber)) {
            return $day;
        }

        return $this->getDayBefore($dayNumber);
    }
614175
public static Calendar previous(Calendar self) {
        Calendar result = (Calendar) self.clone();
        result.add(Calendar.DATE, -1);
        return result;
    }
44665
function isDayBefore(d1, d2) {
  var day1 = clone(d1).setHours(0, 0, 0, 0);
  var day2 = clone(d2).setHours(0, 0, 0, 0);
  return day1 < day2;
}
112672
@Nonnull
  public static LocalDate getCurrentOrNextWorkDay ()
  {
    LocalDate aDT = PDTFactory.getCurrentLocalDate ();
    while (isWorkDay (aDT))
      aDT = aDT.plusDays (1);
    return aDT;
  }
455633
protected function get_previous_day_data() {
        $type = $this->related['type'];
        $time = $type->get_prev_day($this->calendar->time);

        return $type->timestamp_to_date_array($time);
    }
1341328
public int getMinutesPerDay()
   {
      return m_minutesPerDay == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerDay()) : m_minutesPerDay.intValue();
   }