@naturalcycles/time-lib
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,8 @@ | ||
# [1.2.0](https://github.com/NaturalCycles/time-lib/compare/v1.1.0...v1.2.0) (2019-07-05) | ||
### Features | ||
* refactor, bundle more plugins by default ([206c010](https://github.com/NaturalCycles/time-lib/commit/206c010)) | ||
# [1.1.0](https://github.com/NaturalCycles/time-lib/compare/v1.0.3...v1.1.0) (2019-05-20) | ||
@@ -2,0 +9,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { DAYJS_ISO_DATE, DAYJS_PRETTY_TIME } from './dayjs.plugins'; | ||
import { dayjs, DAYJS_2018_06_21, ms, nowPretty, nowUnix, since, todayIso } from './time.util'; | ||
import { dayjs } from './dayjs.full'; | ||
import { ms, since, TS_2018_06_21 } from './time.util'; | ||
export { dayjs, // should be imported from time.util, cause it's an extended version | ||
DAYJS_ISO_DATE, DAYJS_PRETTY_TIME, DAYJS_2018_06_21, nowUnix, nowPretty, todayIso, since, ms, }; | ||
TS_2018_06_21, since, ms, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const dayjs_plugins_1 = require("./dayjs.plugins"); | ||
exports.DAYJS_ISO_DATE = dayjs_plugins_1.DAYJS_ISO_DATE; | ||
exports.DAYJS_PRETTY_TIME = dayjs_plugins_1.DAYJS_PRETTY_TIME; | ||
const dayjs_full_1 = require("./dayjs.full"); | ||
exports.dayjs = dayjs_full_1.dayjs; | ||
const time_util_1 = require("./time.util"); | ||
exports.dayjs = time_util_1.dayjs; | ||
exports.DAYJS_2018_06_21 = time_util_1.DAYJS_2018_06_21; | ||
exports.ms = time_util_1.ms; | ||
exports.nowPretty = time_util_1.nowPretty; | ||
exports.nowUnix = time_util_1.nowUnix; | ||
exports.since = time_util_1.since; | ||
exports.todayIso = time_util_1.todayIso; | ||
exports.TS_2018_06_21 = time_util_1.TS_2018_06_21; | ||
//# sourceMappingURL=index.js.map |
@@ -1,9 +0,2 @@ | ||
import dayjs = require('dayjs'); | ||
import 'dayjs'; | ||
import 'dayjs/plugin/utc'; | ||
export { dayjs }; | ||
export declare const DAYJS_2018_06_21: dayjs.Dayjs; | ||
export declare function nowUnix(): number; | ||
export declare function nowPretty(): string; | ||
export declare function todayIso(): string; | ||
export declare const TS_2018_06_21 = 1529539200; | ||
/** | ||
@@ -10,0 +3,0 @@ * Returns time passed since `from` until `until` (default to Date.now()) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const dayjs = require("dayjs"); | ||
exports.dayjs = dayjs; | ||
require("dayjs"); | ||
const utc = require("dayjs/plugin/utc"); | ||
require("dayjs/plugin/utc"); | ||
const dayjs_plugins_1 = require("./dayjs.plugins"); | ||
dayjs.extend(utc); | ||
dayjs.extend(dayjs_plugins_1.dayjsPlugins); | ||
exports.DAYJS_2018_06_21 = dayjs('2018-06-21'); | ||
function nowUnix() { | ||
return dayjs().unix(); | ||
} | ||
exports.nowUnix = nowUnix; | ||
function nowPretty() { | ||
return dayjs().toPretty(); | ||
} | ||
exports.nowPretty = nowPretty; | ||
function todayIso() { | ||
return dayjs().toISODate(); | ||
} | ||
exports.todayIso = todayIso; | ||
exports.TS_2018_06_21 = 1529539200; | ||
/** | ||
@@ -25,0 +5,0 @@ * Returns time passed since `from` until `until` (default to Date.now()) |
@@ -34,3 +34,3 @@ { | ||
}, | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Date/time related API, based on DayJS", | ||
@@ -37,0 +37,0 @@ "keywords": [ |
@@ -10,2 +10,5 @@ ## @naturalcycles/time-lib | ||
- Plugins | ||
- default | ||
- isoWeekday | ||
- ... | ||
@@ -12,0 +15,0 @@ |
@@ -1,14 +0,9 @@ | ||
import { DAYJS_ISO_DATE, DAYJS_PRETTY_TIME } from './dayjs.plugins' | ||
import { dayjs, DAYJS_2018_06_21, ms, nowPretty, nowUnix, since, todayIso } from './time.util' | ||
import { dayjs } from './dayjs.full' | ||
import { ms, since, TS_2018_06_21 } from './time.util' | ||
export { | ||
dayjs, // should be imported from time.util, cause it's an extended version | ||
DAYJS_ISO_DATE, | ||
DAYJS_PRETTY_TIME, | ||
DAYJS_2018_06_21, | ||
nowUnix, | ||
nowPretty, | ||
todayIso, | ||
TS_2018_06_21, | ||
since, | ||
ms, | ||
} |
@@ -1,26 +0,3 @@ | ||
import dayjs = require('dayjs') | ||
import 'dayjs' | ||
import utc = require('dayjs/plugin/utc') | ||
import 'dayjs/plugin/utc' | ||
import { dayjsPlugins } from './dayjs.plugins' | ||
dayjs.extend(utc) | ||
dayjs.extend(dayjsPlugins) | ||
export const TS_2018_06_21 = 1529539200 | ||
// export modified dayjs | ||
export { dayjs } | ||
export const DAYJS_2018_06_21 = dayjs('2018-06-21') | ||
export function nowUnix (): number { | ||
return dayjs().unix() | ||
} | ||
export function nowPretty (): string { | ||
return dayjs().toPretty() | ||
} | ||
export function todayIso (): string { | ||
return dayjs().toISODate() | ||
} | ||
/** | ||
@@ -27,0 +4,0 @@ * Returns time passed since `from` until `until` (default to Date.now()) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
14412
23
285
21
1