Created
October 31, 2014 10:46
-
-
Save christemple/73506e58e87d4e2f797b to your computer and use it in GitHub Desktop.
Get previous 30 days labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_previous_thirty_days_labels_from = (now, callback)-> | |
previous_days = [] | |
for days_to_subtract in [0..29] | |
previous_days.unshift moment(now).subtract(days_to_subtract, 'day').format("DD") | |
callback(previous_days) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment