@everyonesoftware/common 11.0.0 → 12.0.0

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.
@@ -779,6 +779,52 @@ declare class EqualFunctions {
779
779
  add(equalFunction: (left: unknown, right: unknown) => (boolean | undefined)): this;
780
780
  }
781
781
 
782
+ declare abstract class DateTime {
783
+ static parse(text: string): DateTime;
784
+ static now(): DateTime;
785
+ abstract getYear(): number;
786
+ abstract getMonth(): number;
787
+ abstract getDay(): number;
788
+ abstract getHour(): number;
789
+ abstract getMinute(): number;
790
+ abstract getSecond(): number;
791
+ abstract addDays(days: number): DateTime;
792
+ /**
793
+ * Compare this {@link DateTime} to the provided {@link DateTime}. If this {@link DateTime} is
794
+ * less than the provided {@link DateTime}, then a negative number will be returned, 0 if
795
+ * they're equal, or a positive number if this {@link DateTime} is greater than the provided
796
+ * {@link DateTime}.
797
+ * @param dateTime The {@link DateTime} to compare to this {@link DateTime}.
798
+ */
799
+ compareTo(dateTime: DateTime, compareTimes: boolean): number;
800
+ static compareTo(left: DateTime, right: DateTime, compareTimes: boolean): number;
801
+ lessThan(dateTime: DateTime, compareTimes: boolean): boolean;
802
+ static lessThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
803
+ lessThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
804
+ static lessThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
805
+ equals(dateTime: DateTime, compareTimes: boolean): boolean;
806
+ static equals(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
807
+ greaterThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
808
+ static greaterThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
809
+ greaterThan(dateTime: DateTime, compareTimes: boolean): boolean;
810
+ static greaterThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
811
+ get debug(): string;
812
+ static debug(dateTime: DateTime): string;
813
+ abstract toString(): string;
814
+ abstract toDateString(): string;
815
+ }
816
+
817
+ /**
818
+ * A type that can be used to get the current {@link DateTime}.
819
+ */
820
+ declare abstract class Clock {
821
+ static create(): Clock;
822
+ /**
823
+ * Get the current {@link DateTime}.
824
+ */
825
+ abstract now(): DateTime;
826
+ }
827
+
782
828
  declare abstract class CharacterWriteStream {
783
829
  /**
784
830
  * Write the provided text to this {@link CharacterWriteStream}.
@@ -796,4 +842,4 @@ declare abstract class CharacterWriteStream {
796
842
  static writeLine(writeStream: CharacterWriteStream, text?: string): AsyncResult<number>;
797
843
  }
798
844
 
799
- export { isString as $, AsyncResult as A, instanceOf as B, CharacterWriteStream as C, instanceOfType as D, EqualFunctions as E, isArray as F, isAsyncIterable as G, isBoolean as H, Iterable$1 as I, type JavascriptArray as J, isFunction as K, isFunctionWithParameterCount as L, isIterable as M, isIterator as N, isJavascriptAsyncIterable as O, PromiseAsyncResult as P, isJavascriptAsyncIterator as Q, isJavascriptIterable as R, SyncResult as S, ToStringFunctions as T, isJavascriptIterator as U, isNull as V, isNumber as W, isObject as X, isObjectOrArrayOrNull as Y, isPromise as Z, isPromiseLike as _, Comparable as a, isUndefined as a0, isUndefinedOrNull as a1, Comparison as b, Iterator$1 as c, type JavascriptAsyncIterable as d, type JavascriptAsyncIterator as e, type JavascriptIterable as f, type JavascriptIterator as g, type JavascriptIteratorResult as h, JavascriptMap as i, JavascriptSet as j, type Type as k, as as l, asArray as m, asBoolean as n, asFunction as o, asFunctionWithParameterCount as p, asNull as q, asNumber as r, asObject as s, asObjectOrArrayOrNull as t, asString as u, getName as v, getParameterCount as w, getPropertyNames as x, hasFunction as y, hasProperty as z };
845
+ export { isPromise as $, AsyncResult as A, hasProperty as B, CharacterWriteStream as C, DateTime as D, EqualFunctions as E, instanceOf as F, instanceOfType as G, isArray as H, Iterable$1 as I, type JavascriptArray as J, isAsyncIterable as K, isBoolean as L, isFunction as M, isFunctionWithParameterCount as N, isIterable as O, PromiseAsyncResult as P, isIterator as Q, isJavascriptAsyncIterable as R, SyncResult as S, ToStringFunctions as T, isJavascriptAsyncIterator as U, isJavascriptIterable as V, isJavascriptIterator as W, isNull as X, isNumber as Y, isObject as Z, isObjectOrArrayOrNull as _, Clock as a, isPromiseLike as a0, isString as a1, isUndefined as a2, isUndefinedOrNull as a3, Comparable as b, Comparison as c, Iterator$1 as d, type JavascriptAsyncIterable as e, type JavascriptAsyncIterator as f, type JavascriptIterable as g, type JavascriptIterator as h, type JavascriptIteratorResult as i, JavascriptMap as j, JavascriptSet as k, type Type as l, as as m, asArray as n, asBoolean as o, asFunction as p, asFunctionWithParameterCount as q, asNull as r, asNumber as s, asObject as t, asObjectOrArrayOrNull as u, asString as v, getName as w, getParameterCount as x, getPropertyNames as y, hasFunction as z };
@@ -779,6 +779,52 @@ declare class EqualFunctions {
779
779
  add(equalFunction: (left: unknown, right: unknown) => (boolean | undefined)): this;
780
780
  }
781
781
 
782
+ declare abstract class DateTime {
783
+ static parse(text: string): DateTime;
784
+ static now(): DateTime;
785
+ abstract getYear(): number;
786
+ abstract getMonth(): number;
787
+ abstract getDay(): number;
788
+ abstract getHour(): number;
789
+ abstract getMinute(): number;
790
+ abstract getSecond(): number;
791
+ abstract addDays(days: number): DateTime;
792
+ /**
793
+ * Compare this {@link DateTime} to the provided {@link DateTime}. If this {@link DateTime} is
794
+ * less than the provided {@link DateTime}, then a negative number will be returned, 0 if
795
+ * they're equal, or a positive number if this {@link DateTime} is greater than the provided
796
+ * {@link DateTime}.
797
+ * @param dateTime The {@link DateTime} to compare to this {@link DateTime}.
798
+ */
799
+ compareTo(dateTime: DateTime, compareTimes: boolean): number;
800
+ static compareTo(left: DateTime, right: DateTime, compareTimes: boolean): number;
801
+ lessThan(dateTime: DateTime, compareTimes: boolean): boolean;
802
+ static lessThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
803
+ lessThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
804
+ static lessThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
805
+ equals(dateTime: DateTime, compareTimes: boolean): boolean;
806
+ static equals(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
807
+ greaterThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
808
+ static greaterThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
809
+ greaterThan(dateTime: DateTime, compareTimes: boolean): boolean;
810
+ static greaterThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
811
+ get debug(): string;
812
+ static debug(dateTime: DateTime): string;
813
+ abstract toString(): string;
814
+ abstract toDateString(): string;
815
+ }
816
+
817
+ /**
818
+ * A type that can be used to get the current {@link DateTime}.
819
+ */
820
+ declare abstract class Clock {
821
+ static create(): Clock;
822
+ /**
823
+ * Get the current {@link DateTime}.
824
+ */
825
+ abstract now(): DateTime;
826
+ }
827
+
782
828
  declare abstract class CharacterWriteStream {
783
829
  /**
784
830
  * Write the provided text to this {@link CharacterWriteStream}.
@@ -796,4 +842,4 @@ declare abstract class CharacterWriteStream {
796
842
  static writeLine(writeStream: CharacterWriteStream, text?: string): AsyncResult<number>;
797
843
  }
798
844
 
799
- export { isString as $, AsyncResult as A, instanceOf as B, CharacterWriteStream as C, instanceOfType as D, EqualFunctions as E, isArray as F, isAsyncIterable as G, isBoolean as H, Iterable$1 as I, type JavascriptArray as J, isFunction as K, isFunctionWithParameterCount as L, isIterable as M, isIterator as N, isJavascriptAsyncIterable as O, PromiseAsyncResult as P, isJavascriptAsyncIterator as Q, isJavascriptIterable as R, SyncResult as S, ToStringFunctions as T, isJavascriptIterator as U, isNull as V, isNumber as W, isObject as X, isObjectOrArrayOrNull as Y, isPromise as Z, isPromiseLike as _, Comparable as a, isUndefined as a0, isUndefinedOrNull as a1, Comparison as b, Iterator$1 as c, type JavascriptAsyncIterable as d, type JavascriptAsyncIterator as e, type JavascriptIterable as f, type JavascriptIterator as g, type JavascriptIteratorResult as h, JavascriptMap as i, JavascriptSet as j, type Type as k, as as l, asArray as m, asBoolean as n, asFunction as o, asFunctionWithParameterCount as p, asNull as q, asNumber as r, asObject as s, asObjectOrArrayOrNull as t, asString as u, getName as v, getParameterCount as w, getPropertyNames as x, hasFunction as y, hasProperty as z };
845
+ export { isPromise as $, AsyncResult as A, hasProperty as B, CharacterWriteStream as C, DateTime as D, EqualFunctions as E, instanceOf as F, instanceOfType as G, isArray as H, Iterable$1 as I, type JavascriptArray as J, isAsyncIterable as K, isBoolean as L, isFunction as M, isFunctionWithParameterCount as N, isIterable as O, PromiseAsyncResult as P, isIterator as Q, isJavascriptAsyncIterable as R, SyncResult as S, ToStringFunctions as T, isJavascriptAsyncIterator as U, isJavascriptIterable as V, isJavascriptIterator as W, isNull as X, isNumber as Y, isObject as Z, isObjectOrArrayOrNull as _, Clock as a, isPromiseLike as a0, isString as a1, isUndefined as a2, isUndefinedOrNull as a3, Comparable as b, Comparison as c, Iterator$1 as d, type JavascriptAsyncIterable as e, type JavascriptAsyncIterator as f, type JavascriptIterable as g, type JavascriptIterator as h, type JavascriptIteratorResult as i, JavascriptMap as j, JavascriptSet as k, type Type as l, as as m, asArray as n, asBoolean as o, asFunction as p, asFunctionWithParameterCount as q, asNull as r, asNumber as s, asObject as t, asObjectOrArrayOrNull as u, asString as v, getName as w, getParameterCount as x, getPropertyNames as y, hasFunction as z };
@@ -22,7 +22,7 @@ import {
22
22
  isString,
23
23
  isUndefinedOrNull,
24
24
  join
25
- } from "./chunk-U7O7WS5F.js";
25
+ } from "./chunk-MHMLVX2O.js";
26
26
 
27
27
  // tests/test.ts
28
28
  var Test = class _Test {
@@ -1196,4 +1196,4 @@ export {
1196
1196
  BasicTestError,
1197
1197
  ConsoleTestRunner
1198
1198
  };
1199
- //# sourceMappingURL=chunk-R3D7NRFL.js.map
1199
+ //# sourceMappingURL=chunk-FZ3WRQ7B.js.map