Skip to content

Commit

Permalink
chore: Update Example CLI with better date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Sep 29, 2018
1 parent 6f756f3 commit d65b118
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/example.cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ const intents = ecolect.intents(en)
.build();

function formatValue(value) {
if(value && value.value) {
return value.value;
if(value) {
if(value.value) {
return value.value;
} else if(value.toDate) {
return value.toDate();
}
}
return value;
}
Expand Down

0 comments on commit d65b118

Please sign in to comment.