@bbn/bbn 2.0.153 → 2.0.154

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.
@@ -112,7 +112,7 @@ export declare abstract class bbnDt<TValue extends bbnDtTemporal> {
112
112
  diff(date: any, unit?: string, abs?: boolean): number;
113
113
  guessUnit(valueInMs: number): string | null;
114
114
  fromNow(unit?: string): string;
115
- fromDate(date: bbnDt<any>, unit?: string): string;
115
+ from(date: bbnDt<any>, unit?: string): string;
116
116
  startOf(unit?: string): bbnDt<any>;
117
117
  endOf(unit?: string): bbnDt<any>;
118
118
  clone(): bbnDt<any>;
@@ -966,7 +966,7 @@ export class bbnDt {
966
966
  const [, rtfUnit] = match; // [shortUnit, rtfUnit, ms]
967
967
  return rtf.format(diff, rtfUnit);
968
968
  }
969
- fromDate(date, unit = '') {
969
+ from(date, unit = '') {
970
970
  const rawDiffMs = this.diff(date);
971
971
  const chosenUnit = unitsCorrespondence[unit] || this.guessUnit(rawDiffMs);
972
972
  if (!chosenUnit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.153",
3
+ "version": "2.0.154",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",