Skip to content

Commit

Permalink
Merge pull request #3 from reza-farhadian/master
Browse files Browse the repository at this point in the history
Console version
  • Loading branch information
alireza-ahmadi committed Jan 1, 2014
2 parents bcd17c4 + f6c6439 commit a2b0f3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bin/convertDate
@@ -0,0 +1,10 @@
#!/usr/bin/env node

/**
* Console version
* Example: convertDate 2013 08 05
*/

var jalali = require('../index.js');
var convertedDate = jalali.convert(process.argv[2], process.argv[3], process.argv[4], process.argv[5], process.argv[6]);
console.log(convertedDate.y + '/' + convertedDate.m + '/' + convertedDate.d);
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -14,5 +14,8 @@
"type":"MIT",
"url":"http://github.com/alireza-ahmadi/jalali/raw/master/LICENSE"
}
]
],
"bin": {
"convertDate": "./bin/convertDate"
}
}

0 comments on commit a2b0f3d

Please sign in to comment.