Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
2b21ee9a24 | |||
3a110c9fd9 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -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": {
|
||||||
|
@ -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",
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
|
Reference in New Issue
Block a user