Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

date-format

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-format - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

16

lib/index.js
"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()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc