Skip to content

Commit

Permalink
inicial
Browse files Browse the repository at this point in the history
  • Loading branch information
jadsilva committed Jul 3, 2015
0 parents commit 7a10877
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/env node

function inspect(obj) {
console.log(obj);
for (m in obj)
console.log('"%s" = "%s"', m, obj[m]);
}

function parseBRTDate(dateString) {
var dateSplited = dateString.split('/');
return new Date(dateSplited[2], dateSplited[1] - 1, dateSplited[0]);
}

function run(input) {

inspect(input);
console.log(parseBRTDate(input.daysOff[0]));
// console.log(input.period.begin.toISOString());
}

var input = {
period: {begin: new Date(), end: new Date(2015,07,31)},
vacationSplit: [10, 10],
fixedDaysOff:['01-01', '09-07'],
daysOff: ['10/05/2015', '2015-08-15']
};
run(input);

0 comments on commit 7a10877

Please sign in to comment.