Skip to content

Commit

Permalink
[api] remove old timestamp function.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed May 26, 2012
1 parent 8da081a commit 8ddbcff
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/winston/common.js
Expand Up @@ -181,15 +181,6 @@ exports.hash = function (str) {
return crypto.createHash('sha1').update(str).digest('hex');
};

//
// ## Borrowed from node.js core
// I wanted a universal lowercase header message, as opposed to the `DEBUG`
// (i.e. all uppercase header) used only in `util.debug()`
//
var months = ['Jan', 'Feb', 'Mar', 'Apr',
'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec'];

//
// ### function pad (n)
// Returns a padded string if `n < 10`.
Expand All @@ -198,21 +189,6 @@ exports.pad = function (n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
};

//
// ### function timestamp ()
// Returns a timestamp string for the current time.
//
exports.timestamp = function () {
var d = new Date();
var time = [
exports.pad(d.getHours()),
exports.pad(d.getMinutes()),
exports.pad(d.getSeconds())
].join(':');

return [d.getDate(), months[d.getMonth()], d.getFullYear(), time].join(' ');
};

//
// ### function timestamp ()
// Returns a timestamp string for the current time.
Expand Down

0 comments on commit 8ddbcff

Please sign in to comment.