date-format
Advanced tools
Comparing version 0.0.0 to 0.0.1
"use strict"; | ||
exports.ISO8601_FORMAT = "yyyy-MM-dd hh:mm:ss.SSS"; | ||
exports.ISO8601_WITH_TZ_OFFSET_FORMAT = "yyyy-MM-ddThh:mm:ssO"; | ||
exports.DATETIME_FORMAT = "dd MM yyyy hh:mm:ss.SSS"; | ||
exports.ABSOLUTETIME_FORMAT = "hh:mm:ss.SSS"; | ||
module.exports = asString | ||
asString.asString = asString | ||
asString.ISO8601_FORMAT = "yyyy-MM-dd hh:mm:ss.SSS"; | ||
asString.ISO8601_WITH_TZ_OFFSET_FORMAT = "yyyy-MM-ddThh:mm:ssO"; | ||
asString.DATETIME_FORMAT = "dd MM yyyy hh:mm:ss.SSS"; | ||
asString.ABSOLUTETIME_FORMAT = "hh:mm:ss.SSS"; | ||
function padWithZeros(vNumber, width) { | ||
@@ -38,4 +42,4 @@ var numAsString = vNumber + ""; | ||
exports.asString = function(/*format,*/ date) { | ||
var format = exports.ISO8601_FORMAT; | ||
function asString(/*format,*/ date) { | ||
var format = asString.ISO8601_FORMAT; | ||
if (typeof(date) === "string") { | ||
@@ -42,0 +46,0 @@ format = arguments[0]; |
{ | ||
"name": "date-format", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "formatting Date objects as strings since 2013", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,2 +15,9 @@ date-format | ||
or | ||
var format = require('date-format'); | ||
format(new Date()); | ||
format('hh:mm:ss.SSS', new Date()); | ||
Format string can be anything, but the following letters will be replaced (and leading zeroes added if necessary): | ||
@@ -17,0 +24,0 @@ * dd - date.getDate() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5898
97
34