aotrautils-srv 0.0.729 → 0.0.731
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-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:27)»*/
|
|
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 SERVER library associated with aotra version : «1_29072022-2359 (07/11/2023-
|
|
5159
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (07/11/2023-02:22:27)»*/
|
|
5147
5160
|
/*-----------------------------------------------------------------------------*/
|
|
5148
5161
|
|
|
5149
5162
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.731",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|