Revision 976:0befb332f41a extra/soundsoftware
| extra/soundsoftware/get-statistics.rb | ||
|---|---|---|
| 25 | 25 |
|
| 26 | 26 |
def weeks_between(d1, d2) |
| 27 | 27 |
weeks = [] |
| 28 |
start_date = Date.civil(d1.year, d1.month, 1)
|
|
| 29 |
end_date = Date.civil(d2.year, d2.month, 1)
|
|
| 28 |
start_date = Date.civil(d1.year, d1.month, d1.day)
|
|
| 29 |
end_date = Date.civil(d2.year, d2.month, d2.day)
|
|
| 30 | 30 |
|
| 31 | 31 |
raise ArgumentError unless d1 <= d2 |
| 32 | 32 |
|
Also available in: Unified diff