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

@naturalcycles/time-lib

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/time-lib - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.1.0](https://github.com/NaturalCycles/time-lib/compare/v1.0.3...v1.1.0) (2019-05-20)
### Features
* days.toCompactTime(seconds?: boolean) ([941abaa](https://github.com/NaturalCycles/time-lib/commit/941abaa))
## [1.0.3](https://github.com/NaturalCycles/time-lib/compare/v1.0.2...v1.0.3) (2019-05-19)

@@ -2,0 +9,0 @@

@@ -12,2 +12,6 @@ import { PluginFunc } from 'dayjs';

toPretty(): string;
/**
* Returns e.g `20180621_1754` or `20180621_175404` (with seconds).
*/
toCompactTime(seconds?: boolean): string;
}

@@ -17,2 +21,4 @@ }

export declare const DAYJS_PRETTY_TIME = "YYYY-MM-DD HH:mm:ss";
export declare const DAYJS_COMPACT_TIME = "YYYYMMDD_HHmm";
export declare const DAYJS_COMPACT_TIME_SECONDS = "YYYYMMDD_HHmmss";
export declare const dayjsPlugins: PluginFunc;

@@ -5,2 +5,4 @@ "use strict";

exports.DAYJS_PRETTY_TIME = 'YYYY-MM-DD HH:mm:ss';
exports.DAYJS_COMPACT_TIME = 'YYYYMMDD_HHmm';
exports.DAYJS_COMPACT_TIME_SECONDS = 'YYYYMMDD_HHmmss';
exports.dayjsPlugins = (_opt, dayjsClass, _dayjsFactory) => {

@@ -13,3 +15,6 @@ dayjsClass.prototype.toISODate = function () {

};
dayjsClass.prototype.toCompactTime = function (seconds = false) {
return this.format(seconds ? exports.DAYJS_COMPACT_TIME_SECONDS : exports.DAYJS_COMPACT_TIME);
};
};
//# sourceMappingURL=dayjs.plugins.js.map

2

package.json

@@ -34,3 +34,3 @@ {

},
"version": "1.0.3",
"version": "1.1.0",
"description": "Date/time related API, based on DayJS",

@@ -37,0 +37,0 @@ "keywords": [

@@ -14,2 +14,7 @@ import { Dayjs, PluginFunc } from 'dayjs'

toPretty (): string
/**
* Returns e.g `20180621_1754` or `20180621_175404` (with seconds).
*/
toCompactTime (seconds?: boolean): string
}

@@ -20,2 +25,4 @@ }

export const DAYJS_PRETTY_TIME = 'YYYY-MM-DD HH:mm:ss'
export const DAYJS_COMPACT_TIME = 'YYYYMMDD_HHmm'
export const DAYJS_COMPACT_TIME_SECONDS = 'YYYYMMDD_HHmmss'

@@ -30,2 +37,6 @@ export const dayjsPlugins: PluginFunc = (_opt, dayjsClass, _dayjsFactory) => {

}
dayjsClass.prototype.toCompactTime = function (this: Dayjs, seconds = false) {
return this.format(seconds ? DAYJS_COMPACT_TIME_SECONDS : DAYJS_COMPACT_TIME)
}
}

Sorry, the diff of this file is not supported yet

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