Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 331 Bytes
# Description:
# Convert a UNIX timestamp to a date string.
#
# Commands:
# hubot convert <integer> - Convert the provided timestamp into a date string.
#
# Author:
# amussey
moment = require('moment')
module.exports = (robot) ->
robot.respond /convert (.*)$/i, (msg) ->
msg.send moment.unix(msg.match[1]).toString()