@bbn/bbn 2.0.97 → 2.0.99

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.
@@ -789,7 +789,7 @@ export class bbnDt {
789
789
  }
790
790
  fromNow(unit = '') {
791
791
  const nowValue = bbnDt.nowForKind(this.kind);
792
- const temp = { kind: this.kind, value: nowValue };
792
+ const temp = bbn.dt(nowValue, null, this.kind);
793
793
  const rawDiffMs = this.diff(temp);
794
794
  const chosenUnit = unitsCorrespondence[unit] || this.guessUnit(rawDiffMs);
795
795
  if (!chosenUnit) {
@@ -26,9 +26,11 @@ const MYSQL_AND_NATIVE_FORMATS = [
26
26
  'ddd MMM DD YYYY HH:II:SS[ GMT]Z',
27
27
  // Tue Oct 29 2024 14:30:00
28
28
  'ddd MMM DD YYYY HH:II:SS',
29
+ 'D MMM',
30
+ 'D MMMM',
31
+ 'D/M',
29
32
  'YYYY-MM-DD',
30
33
  'YYYY-MM',
31
- 'MM-DD',
32
34
  'HH:II:SS',
33
35
  'HH:II',
34
36
  ];
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { Temporal } from 'temporal-polyfill';
2
- import { bbnDtDate, bbnDtDateTime, bbnDtTime, bbnDtYearMonth, bbnDtMonthDay, bbnDtZoned, bbnDtDuration } from './dt/index.js';
3
2
  declare const bbn: Bbn;
4
- export { bbn as default, bbn, Temporal, bbnDtDate, bbnDtDateTime, bbnDtTime, bbnDtYearMonth, bbnDtMonthDay, bbnDtZoned, bbnDtDuration };
3
+ export { bbn as default, bbn, Temporal };
package/dist/index.js CHANGED
@@ -8,7 +8,6 @@ import com from './com.js';
8
8
  import db from './db.js';
9
9
  import fn from './fn.js';
10
10
  import dt from './dt.js';
11
- import { bbnDtDate, bbnDtDateTime, bbnDtTime, bbnDtYearMonth, bbnDtMonthDay, bbnDtZoned, bbnDtDuration } from './dt/index.js';
12
11
  const bbn = {
13
12
  version: "1.0.1",
14
13
  opt: {
@@ -99,4 +98,4 @@ if ('undefined' !== typeof window) {
99
98
  window.Temporal = Temporal;
100
99
  }
101
100
  }
102
- export { bbn as default, bbn, Temporal, bbnDtDate, bbnDtDateTime, bbnDtTime, bbnDtYearMonth, bbnDtMonthDay, bbnDtZoned, bbnDtDuration };
101
+ export { bbn as default, bbn, Temporal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.97",
3
+ "version": "2.0.99",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",