Get the current local time of a GitHub user.
Ever wanted to ping someone on github and were wondering what time zone does the dev is on?
dev-time
helps you with getting the local time of GitHub user.
How does it do that? Well, it gets the latest commit of the user and get the time stamp from there and then find the time.
Get it: npm install --save dev-time
For CLI: npm install --global dev-time-cli
Sample usage API:
1
2
3
4
5
6
| const devTime = require('dev-time');
devTime('SamVerschueren').then(time => {
console.log(time);
//=> '2015-12-10T21:18:34+05:30'
});
|
On CLI:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| $ dev-time --help
Usage
$ dev-time <user> <user2> ...
Options
-v, --verbose Show UTC offset.
--format The moment format of the output. [Default: HH:mm - D MMM. YYYY]
--token The GitHub authentication token.
Examples
$ dev-time SamVerschueren
19:47 - 8 Dec. 2015
$ dev-time SamVerschueren sindresorhus
SamVerschueren
19:47 - 8 Dec. 2015
sindresorhus
18:47 - 8 Dec. 2015
$ dev-time SamVerschueren -v
19:47 - 8 Dec. 2015 - UTC+1
$ dev-time SamVerschueren --format DD-MM-YYYY
07-12-2015
|
GIF FTW!
