Tous les codes sources "Mais pourquoi ?"page 18
JavaScript
22 August, 2014 à 08:26
#168
var t = new Date('<? echo date("Y,m,d",strtotime("+3 month")); ?>');
C#
21 August, 2014 à 05:14
#116
/// <summary>
/// We want to check if record date is proper.
/// </summary>
/// <returns>TRUE if Ok.</returns>
public bool IsRecordDateIsOk()
{
int act, min, max;
/* We compare only the date, not the time */
act = System.DateTime.Now.Year * 10000 + System.DateTime.Now.Month * 100 + System.DateTime.Now.Day;
min = this.recordDate.Year * 10000 + this.recordDate.Month * 100 + this.recordDate.Day;
max = this.dateMax.Year * 10000 + this.dateMax.Month * 100 + this.dateMax.Day;
if ((min <= act) && (act <= max))
{
return (true);
}
else
{
return (false);
}
}