puvox-library 1.0.55 → 1.0.56

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.
@@ -944,6 +944,27 @@ const puvox_library =
944
944
  } else {
945
945
  return [1900 + dt.getYear(), dt.getMonth()+1, dt.getDate(), dt.getHours(), dt.getMinutes(), dt.getSeconds(), dt.getMilliseconds()];
946
946
  }
947
+ },
948
+ getYMDHISFfromDateWithZeros(dt, utc=true){
949
+ let y, M, d, h, m, s, f;
950
+ if (utc) {
951
+ y = dt.getUTCFullYear();
952
+ M = dt.getUTCMonth()+1;
953
+ d = dt.getUTCDate();
954
+ h = dt.getUTCHours();
955
+ m = dt.getUTCMinutes();
956
+ s = dt.getUTCSeconds();
957
+ f = dt.getUTCMilliseconds();
958
+ } else {
959
+ y = 1900 + dt.getYear();
960
+ M = dt.getMonth()+1;
961
+ d = dt.getDate();
962
+ h = dt.getHours();
963
+ m = dt.getMinutes();
964
+ s = dt.getSeconds();
965
+ f = dt.getMilliseconds();
966
+ }
967
+ return [y.toString(), (M<10?'0':'')+M.toString(), (d<10?'0':'')+d.toString(), (h<10?'0':'')+h.toString(), (m<10?'0':'')+m.toString(), (s<10?'0':'')+s.toString(), (f<10?'00':(f<100?'0':''))+f.toString()];
947
968
  },
948
969
  prefixWithZero(num, digits){
949
970
  return (digits===1 ? num : (digits===2 ? (num < 10 ? "0"+num : num ) : (digits===3 ? (num < 10 ? "00"+num : (num < 100 ? "0"+num : num ) ) : num ) ) ).toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puvox-library",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "library-class-javascript",
5
5
  "main": "library_standard.js",
6
6
  "scripts": {