/**
  * Build the fullpath for the backup file.
  * Checks if the target directory is writable.
  * Returns a string in the format path/stemname_YYYY-MM-DD.sql
  *
  * @param string $path         The target path where the backup file should be
  *                             written to
  * @param string $fileStemName The file stem name (the part without the date
  *                             and extension).
  * @return string              The full path including the .sql extension
  */
 public static function makeDatedFullPath($path, $fileStemName, $includeTime = false)
 {
     $extension = '.sql';
     $date = $includeTime ? str_replace(':', '', uFormat::spacesToUnderscore(uDateTime::now())) : uDate::today();
     $fname = $fileStemName . '_' . $date . $extension;
     return uFs::mp(array($path, $fname));
 }
 public static function daysBetweenDates($startDate, $endDate)
 {
     return uDate::daysBetweenDates(substr($startDate, 0, 10), substr($endDate, 0, 10));
 }