Your example contains a January date, which is more than 6 month ago.
Note also that for half a year, the previous 6 months will contain dates from more than one year. I presume that if you're running your program in March, you'd want December dates to be sorted before January dates, don't you? | [reply] |
Right, my example is just a sample code written to demonstrate my requirement. I didnt notice January included in that array :( And let me clarify my requirement, im looking for a minimal approach of reading my firewall log and make a report with DoS attacker's IP,Threat type, No. of attempts, and Last attempt date. I need this report only twice a year.That is, from Jan 2010 - June 2010, Jul 2010 - Dec 2010, Jan 2011 - Jun 2011 so on .. I would like to archive my log file after each period. So i hope this approach will help me in acheiving my task.
Thanks very much for your support :)
~suhail
| [reply] |