@kizmann/pico-js 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/utility/now.js +27 -0
- package/src/utility/object.js +1 -1
package/package.json
CHANGED
package/src/utility/now.js
CHANGED
@@ -507,6 +507,33 @@ export class Now
|
|
507
507
|
});
|
508
508
|
}
|
509
509
|
|
510
|
+
resetTime()
|
511
|
+
{
|
512
|
+
this.hour(0);
|
513
|
+
this.minute(0);
|
514
|
+
this.second(0);
|
515
|
+
|
516
|
+
return this;
|
517
|
+
}
|
518
|
+
|
519
|
+
applyDate(now, format = 'YYYY-MM-DD hh:mm:ss')
|
520
|
+
{
|
521
|
+
now = Now.make(now, format);
|
522
|
+
|
523
|
+
this.year(now.year());
|
524
|
+
this.month(now.month());
|
525
|
+
this.date(now.date());
|
526
|
+
}
|
527
|
+
|
528
|
+
applyTime(now, format = 'YYYY-MM-DD hh:mm:ss')
|
529
|
+
{
|
530
|
+
now = Now.make(now, format);
|
531
|
+
|
532
|
+
this.hour(now.hour());
|
533
|
+
this.minute(now.minute());
|
534
|
+
this.second(now.second());
|
535
|
+
}
|
536
|
+
|
510
537
|
}
|
511
538
|
|
512
539
|
export default Now;
|
package/src/utility/object.js
CHANGED