jeremyFreeAgent / Bitter

Bitter is a simple but powerful analytics library
http://bitter.free-agent.fr
MIT License
129 stars 18 forks source link

Add a method to return the count by period with interval #12

Open jeremyFreeAgent opened 11 years ago

jeremyFreeAgent commented 11 years ago

See #11 for the start of the talk.

stephpy commented 11 years ago

I'm +1 on @shouze comment:

bitDatePeriod needs to be renamed into bitDateRange as it looks confusing ATM A new method needs to be introduced, something like countByPeriodWithInterval(\DateTime $from, \DateTime $to, \DateInterval $interval). This method should return an array or any iterable object collection.

stephpy commented 11 years ago

On second point. Why does not use

countByPeriod(\DatePeriod $datePeriod) ?

jeremyFreeAgent commented 11 years ago

There is no more bitDatePeriod, it's bitDateRange now. :hammer:

jeremyFreeAgent commented 11 years ago

DatePeriod is a holy crap. I think it's a trainee who made it... :school_satchel:

stephpy commented 11 years ago

Yes, let's overwrite it :)