| Subject: | Hi !! This class maybe useful !! But i think the best choose... |
| Summary: | Package rating comment |
| Messages: | 4 |
| Author: | José Filipe Lopes Santos |
| Date: | 2008-04-29 11:05:43 |
| Update: | 2012-03-25 10:18:38 |
| |
|
|
José Filipe Lopes Santos rated this package as follows:
| Utility: | Good |
| Consistency: | Good |
| Documentation: | Good |
| Examples: | Good |
|
|
| |
1. Hi !! This class maybe useful !! But i think the best choose... |
|
Reply |
|
|
 José Filipe Lopes Santos | 2008-04-29 11:05:43 |
Hi !!
This class maybe useful !!
But i think the best choose to compare dates is recorring to mktime, and compare resulting timestamps ... !! lol
Its only a ideia !! |
| |
2. Re: Hi !! This class maybe useful !! But i think the best choos |
|
Reply |
|
|
 Taha Paksu | 2008-04-29 11:22:46 - In reply to message 1 from José Filipe Lopes Santos |
Yes, thats a way to get things work too. but this one is enough and much faster because mktime does not accept negative values comparing 1.1.1970 and this is a problem in mktime. when you write mktime(0,0,0,-2,0,0) mktime raises an error. And if you look at dateDiff, it first looks at the dates to find which is bigger to make the mktime values positive. Thats not necessary for comparing.
You can use it like this:
$date1 = $date->parseDate("Y-m-d","2008-04-29");
$date2 = $date->parseDate("Y-m-d","2008-03-29");
$dateDiff = $this->Compare($date1,$date2);
Thank you for your suggestion. |
| |
3. Re: Hi !! This class maybe useful !! But i think the best choose... |
|
Reply |
|
|
 José Filipe Lopes Santos | 2012-03-23 17:03:50 - In reply to message 1 from José Filipe Lopes Santos |
This is very good and useful class :-)
You are a expert, and had many nominations and awards :-D
|
| |
4. Re: Hi !! This class maybe useful !! But i think the best choos |
|
Reply |
|
|
 Taha Paksu | 2012-03-25 10:18:38 - In reply to message 3 from José Filipe Lopes Santos |
| Thank you very much José :) |
|