Compare commits

..

2 Commits

Author SHA1 Message Date
2b21ee9a24 3.0.37 2020-10-05 22:28:40 +00:00
3a110c9fd9 fix(core): update 2020-10-05 22:28:40 +00:00
4 changed files with 9 additions and 2 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smarttime", "name": "@pushrocks/smarttime",
"version": "3.0.36", "version": "3.0.37",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,7 +1,7 @@
{ {
"name": "@pushrocks/smarttime", "name": "@pushrocks/smarttime",
"private": false, "private": false,
"version": "3.0.36", "version": "3.0.37",
"description": "handle time in smart ways", "description": "handle time in smart ways",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",

View File

@ -125,4 +125,8 @@ export class ExtendedDate extends Date {
public format (formatArg: string) { public format (formatArg: string) {
return plugins.dayjs(this.getTime()).format(formatArg); return plugins.dayjs(this.getTime()).format(formatArg);
} }
public isToday () {
return plugins.dayjs(this.getTime()).isToday();
}
} }

View File

@ -8,5 +8,8 @@ export { lik, smartdelay, smartpromise };
// third parties // third parties
import croner from 'croner'; import croner from 'croner';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import isToday from 'dayjs/plugin/isToday';
dayjs.extend(isToday);
export { croner, dayjs }; export { croner, dayjs };