aotrautils 0.0.734 → 0.0.735

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (07/11/2023-00:35:50)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:20)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -2174,6 +2174,19 @@ window.gotoValueLinearly=function(source, destination, doOnRefreshTreatment,/*OP
2174
2174
 
2175
2175
  }
2176
2176
 
2177
+ // ==================== Dates management ====================
2178
+ window.compareDates=function(date1=null,date2=null){
2179
+ if(date1==null && date2==null) return 0;
2180
+ if(date1==null && date2!=null) return 1;
2181
+ if(date1!=null && date2==null) return -1;
2182
+ if(typeof(date1)!="Date" || typeof(date2)!="Date"){
2183
+ throw new Error(`Cannot compare dates with types : ${typeof(date1)} ; ${typeof(date2)}`);
2184
+ }
2185
+ if(date1.getTime()==date2.getTime()) return 0;
2186
+ if(date1.getTime()<date2.getTime()) return 1;
2187
+ return -1;
2188
+ }
2189
+
2177
2190
 
2178
2191
 
2179
2192
  // ==================== Strings management ====================
@@ -5143,7 +5156,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5143
5156
 
5144
5157
 
5145
5158
 
5146
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (07/11/2023-00:35:50)»*/
5159
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:20)»*/
5147
5160
  /*-----------------------------------------------------------------------------*/
5148
5161
  /* ## Utility global methods in a browser (htmljs) client environment.
5149
5162
  *
@@ -13385,7 +13398,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13385
13398
 
13386
13399
 
13387
13400
 
13388
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (07/11/2023-00:35:50)»*/
13401
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:20)»*/
13389
13402
  /*-----------------------------------------------------------------------------*/
13390
13403
 
13391
13404
 
@@ -14624,7 +14637,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14624
14637
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14625
14638
 
14626
14639
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14627
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (07/11/2023-00:35:50)»*/
14640
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:20)»*/
14628
14641
  /*-----------------------------------------------------------------------------*/
14629
14642
 
14630
14643
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.734",
3
+ "version": "0.0.735",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",