using System;
using System.Collections.Generic;
using System.Text;
namespace ivware.Mobile.RAPISync.Core
{
public class Utilities
{
///
/// Compares 2 dates ignoring the milliseconds
/// The i_lhs.
/// The i_rhs.
///
public static bool AreEqual(DateTime i_lhs, DateTime i_rhs)
{
TimeSpan diff = i_lhs - i_rhs;
if (Math.Abs(Math.Floor(diff.TotalSeconds)) > 0)
return false;
else
return true;
}
public static string CleanFileName(string i_file)
{
string retVal = i_file.Replace("/", "");
retVal = retVal.Replace(@"\", "");
retVal = retVal.Replace(":", "");
retVal = retVal.Replace("*", "");
retVal = retVal.Replace("?", "");
retVal = retVal.Replace("\"", "");
retVal = retVal.Replace("<", "");
retVal = retVal.Replace(">", "");
retVal = retVal.Replace("|", "");
return retVal;
}
}
}