dangrossman/bootstrap-daterangepicker — pull request #91 by mrjj (2013-04-24 22:16:03+00:00)
Title: Arrays support for ranges added

Objects iteration order is arbitrary in js, but the exact order for the ranges can be required.
Polymorphic behavior for Object and Array ranges was added across the code, preserving the old object-form option for them.

The new form for ranges option is:

ranges: [
[Date.today().add({ days: -6 }), Date.today().add({ days: 7 }), 'Closest weeks'],
[Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth(), 'This month'],
[Date.today().moveToFirstDayOfMonth().add({ months: -1 }), Date.today().moveToFirstDayOfMonth().add({ days: -1 }), 'Previous month']
],

Name of range was moved from object key to last element `[2]` to reduce error probability when working with the date range in code on the first and second positions.

Also there is new `getRangeByLabel` internal method added to handle range lookup for both representations.