Created
June 7, 2018 08:09
-
-
Save lbrutti/7d439cc34d3358627752f843dda6e8d1 to your computer and use it in GitHub Desktop.
Converts json received from goggle cal API in format to be used in moment-holiday plugin locale files
This file contains hidden or 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
//depends on lodash | |
var momentHolidays = {}; | |
_.map(googleRes.items, function(o) { | |
momentHolidays[o.summary] = { | |
'date': (o.start.date.split("-")[1] + '/' + o.start.date.split("-")[2]) | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment