Skip to content

Instantly share code, notes, and snippets.

@lbrutti
Created June 7, 2018 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbrutti/7d439cc34d3358627752f843dda6e8d1 to your computer and use it in GitHub Desktop.
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
//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