@bbn/bbn 2.0.81 → 2.0.82
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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/dt.js +4 -3
- package/package.json +1 -1
package/dist/dt.js
CHANGED
|
@@ -9,7 +9,6 @@ import bbnDtDuration from './dt/classes/duration.js';
|
|
|
9
9
|
import _ from './_.js';
|
|
10
10
|
import parse from './dt/functions/parse.js';
|
|
11
11
|
import guessFormat from './dt/functions/guessFormat.js';
|
|
12
|
-
import getRow from './fn/object/getRow.js';
|
|
13
12
|
const patterns = [
|
|
14
13
|
// MariaDB DATETIME "YYYY-MM-DD HH:MM:SS"
|
|
15
14
|
{
|
|
@@ -261,8 +260,10 @@ dt.time = () => { };
|
|
|
261
260
|
dt.date = () => { };
|
|
262
261
|
dt.dateTime = () => { };
|
|
263
262
|
dt.duration = (amount, unit) => {
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
if (amount instanceof Temporal.Duration) {
|
|
264
|
+
return new bbnDtDuration(amount);
|
|
265
|
+
}
|
|
266
|
+
return bbnDtDuration.fromUnit(amount, unit);
|
|
266
267
|
};
|
|
267
268
|
dt.zoned = () => { };
|
|
268
269
|
dt.monthDay = () => { };
|