best-globals 1.1.3 → 1.1.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.
Files changed (2) hide show
  1. package/best-globals.js +8 -3
  2. package/package.json +3 -3
package/best-globals.js CHANGED
@@ -493,11 +493,14 @@ bestGlobals.Datetime.prototype.toPlainString = function toPlainString(preserveHm
493
493
  }
494
494
  // bestGlobals.Datetime.prototype.toUTCString = function toUTCString(){ return this.iso; }
495
495
 
496
- bestGlobals.Datetime.prototype.toPostgres = function toPostgres(){
496
+ bestGlobals.Datetime.prototype.toSqlString = function toSqlString(){
497
497
  return this.toPlainString();
498
498
  }
499
499
 
500
- bestGlobals.Datetime.prototype.toLocaleString = function toPostgres(){
500
+ bestGlobals.Datetime.prototype.toPostgres = bestGlobals.Datetime.prototype.toSqlString;
501
+
502
+
503
+ bestGlobals.Datetime.prototype.toLocaleString = function toSqlString(){
501
504
  var str=this.toDmy()+' '+this.toHms();
502
505
  var prune = function(what){
503
506
  if(str.substr(str.length-what.length)==what){
@@ -692,10 +695,12 @@ bestGlobals.TimeInterval.prototype.toHmsOrMs = function toHmsOrMs(){
692
695
  return this.toHms(false,false,false,true,true);
693
696
  }
694
697
 
695
- bestGlobals.TimeInterval.prototype.toPostgres = function toPostgres(){
698
+ bestGlobals.TimeInterval.prototype.toSqlString = function toSqlString(){
696
699
  return this.timeInterval.ms+'ms';
697
700
  }
698
701
 
702
+ bestGlobals.TimeInterval.prototype.toPostgres = bestGlobals.TimeInterval.prototype.toSqlString;
703
+
699
704
  bestGlobals.timeInterval = function timeInterval(timePack) {
700
705
  return new bestGlobals.TimeInterval(timePack);
701
706
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "best-globals",
3
3
  "description": "common global function and constants - i.e. changes",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/best-globals",
@@ -20,7 +20,7 @@
20
20
  "colors": "~1.4.0",
21
21
  "cookie-parser": "^1.4.6",
22
22
  "expect.js": "~0.3.1",
23
- "express": "^4.18.3",
23
+ "express": "^4.19.2",
24
24
  "express-session": "^1.18.0",
25
25
  "karma": "^6.4.3",
26
26
  "karma-chrome-launcher": "^3.2.0",
@@ -30,7 +30,7 @@
30
30
  "karma-firefox-launcher": "^2.1.3",
31
31
  "karma-mocha": "^2.0.1",
32
32
  "nyc": "~15.1.0",
33
- "mocha": "~10.3.0",
33
+ "mocha": "~10.4.0",
34
34
  "require-bro": "^0.3.1",
35
35
  "sinon": "~17.0.1",
36
36
  "audit-copy": "~0.1.0",