@thisisagile/easy 18.1.2 → 18.3.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.
- package/dist/{chunk-KHB4I7CQ.mjs → chunk-4BMUPWAJ.mjs} +2 -2
- package/dist/{chunk-2J4JWSYC.mjs → chunk-4PQAGLRK.mjs} +2 -2
- package/dist/{chunk-MU6KQ7PB.mjs → chunk-4XY7L4GK.mjs} +2 -2
- package/dist/{chunk-6HZZB2X6.mjs → chunk-5OHYO5NV.mjs} +3 -3
- package/dist/{chunk-P6HFLY47.mjs → chunk-5SA3LDLX.mjs} +3 -3
- package/dist/{chunk-65N5GWGU.mjs → chunk-6XYEP3PI.mjs} +4 -4
- package/dist/{chunk-WMYDNAUS.mjs → chunk-7SLDERPB.mjs} +4 -4
- package/dist/{chunk-G4ZI3RMH.mjs → chunk-AHTAM4NJ.mjs} +2 -2
- package/dist/{chunk-CQXTVAXK.mjs → chunk-AU4TT4W7.mjs} +4 -4
- package/dist/{chunk-2IDALCMP.mjs → chunk-DFYAOK6M.mjs} +2 -2
- package/dist/{chunk-HQEQZNIW.mjs → chunk-EVG23WHU.mjs} +3 -3
- package/dist/{chunk-EBVCNYJM.mjs → chunk-FIIA7ENW.mjs} +2 -2
- package/dist/{chunk-ZXEJWSGG.mjs → chunk-GJGGFAOR.mjs} +3 -3
- package/dist/{chunk-YPGKP4EG.mjs → chunk-HTWGHZHY.mjs} +2 -2
- package/dist/{chunk-HOHEXP7R.mjs → chunk-I2TZE77T.mjs} +2 -2
- package/dist/{chunk-E37FO7JM.mjs → chunk-JA4LHFAJ.mjs} +2 -2
- package/dist/{chunk-VWHLBVRP.mjs → chunk-JKA6TS2W.mjs} +4 -4
- package/dist/{chunk-KIBIS5RL.mjs → chunk-JOVRTPGK.mjs} +2 -2
- package/dist/{chunk-72X4GRZS.mjs → chunk-KJTUEU2S.mjs} +4 -4
- package/dist/{chunk-KWET43K6.mjs → chunk-KRGEMORR.mjs} +3 -3
- package/dist/{chunk-P62INSZI.mjs → chunk-LCKMOXL4.mjs} +8 -8
- package/dist/{chunk-OXCNYART.mjs → chunk-LTTIVS2R.mjs} +3 -3
- package/dist/{chunk-H5VLAHK3.mjs → chunk-M4SESBLT.mjs} +4 -4
- package/dist/{chunk-BYGVL3C5.mjs → chunk-MKZLN3EP.mjs} +2 -2
- package/dist/{chunk-XLXPPD64.mjs → chunk-NRMUNBNT.mjs} +9 -9
- package/dist/chunk-O3UNRTSC.mjs +33 -0
- package/dist/chunk-O3UNRTSC.mjs.map +1 -0
- package/dist/{chunk-TU6OXP22.mjs → chunk-O547ZFYP.mjs} +4 -4
- package/dist/{chunk-754SQGUB.mjs → chunk-PLIJRFFH.mjs} +2 -2
- package/dist/{chunk-DHIYFYVE.mjs → chunk-QJBH2BQG.mjs} +5 -5
- package/dist/{chunk-WM4PAINX.mjs → chunk-RRCOMMYB.mjs} +3 -3
- package/dist/{chunk-FVA6DUVX.mjs → chunk-RYWDUDTJ.mjs} +4 -4
- package/dist/{chunk-3WZHV3BO.mjs → chunk-SHEJ7PNI.mjs} +7 -7
- package/dist/{chunk-V4FY3P2Z.mjs → chunk-STBIY75D.mjs} +2 -2
- package/dist/{chunk-4MTV5YJB.mjs → chunk-VDDHUQPK.mjs} +2 -2
- package/dist/{chunk-XDE25I6E.mjs → chunk-VTXFZ2S3.mjs} +3 -3
- package/dist/{chunk-J7YL4RXZ.mjs → chunk-WGWMLY7Q.mjs} +4 -4
- package/dist/{chunk-QMZVL3AZ.mjs → chunk-WPHQRWHF.mjs} +4 -4
- package/dist/{chunk-MBSQZ6FC.mjs → chunk-WT6TNFBH.mjs} +2 -2
- package/dist/{chunk-6F2F4M4L.mjs → chunk-XL5HGL2Q.mjs} +3 -3
- package/dist/{chunk-TZXUZ7XN.mjs → chunk-YTNVFND2.mjs} +4 -4
- package/dist/{chunk-HJHUZJZL.mjs → chunk-YXAXW4CU.mjs} +3 -3
- package/dist/{chunk-AAYDOFEY.mjs → chunk-ZMJMSJO7.mjs} +3 -3
- package/dist/data/Condition.mjs +5 -5
- package/dist/data/Database.mjs +6 -6
- package/dist/data/Field.mjs +5 -5
- package/dist/data/InMemoryGateway.mjs +9 -9
- package/dist/domain/Audit.mjs +13 -13
- package/dist/domain/Child.mjs +10 -10
- package/dist/domain/DateTime.mjs +9 -9
- package/dist/domain/Entity.mjs +13 -13
- package/dist/domain/Repo.mjs +12 -12
- package/dist/domain/Struct.mjs +9 -9
- package/dist/domain/Typo.mjs +9 -9
- package/dist/http/CacheControl.mjs +9 -9
- package/dist/http/ContentType.mjs +6 -6
- package/dist/http/HttpStatus.mjs +6 -6
- package/dist/http/HttpVerb.mjs +6 -6
- package/dist/http/LocalRequestStore.mjs +7 -7
- package/dist/http/RequestOptions.mjs +9 -9
- package/dist/http/RestResult.mjs +9 -9
- package/dist/http/toResponse.mjs +10 -10
- package/dist/index.d.ts +3 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/dist/process/App.mjs +8 -8
- package/dist/process/Manage.mjs +9 -9
- package/dist/process/Scope.mjs +8 -8
- package/dist/process/Search.mjs +9 -9
- package/dist/process/UseCase.mjs +7 -7
- package/dist/resources/Req.mjs +8 -8
- package/dist/services/Api.mjs +17 -17
- package/dist/services/ApiGateway.mjs +20 -20
- package/dist/services/AxiosProvider.mjs +15 -15
- package/dist/services/MappedRouteGateway.mjs +23 -23
- package/dist/services/RouteGateway.mjs +21 -21
- package/dist/services/ViewRouteGateway.mjs +24 -24
- package/dist/sql/Column.mjs +8 -8
- package/dist/sql/Count.mjs +5 -5
- package/dist/sql/Delete.mjs +4 -4
- package/dist/sql/Insert.mjs +4 -4
- package/dist/sql/Select.mjs +4 -4
- package/dist/sql/SqlQuery.mjs +3 -3
- package/dist/sql/Table.mjs +17 -17
- package/dist/sql/TableGateway.mjs +9 -9
- package/dist/sql/Update.mjs +4 -4
- package/dist/types/Cache.mjs +4 -4
- package/dist/types/CacheAge.mjs +9 -9
- package/dist/types/Case.mjs +7 -7
- package/dist/types/Context.mjs +7 -7
- package/dist/types/Enum.mjs +5 -5
- package/dist/types/Environment.mjs +5 -5
- package/dist/types/Exception.mjs +7 -7
- package/dist/types/Gateway.mjs +8 -8
- package/dist/types/IsEqual.mjs +8 -8
- package/dist/types/Json.mjs +4 -4
- package/dist/types/List.mjs +2 -2
- package/dist/types/Meta.mjs +4 -4
- package/dist/types/Number.mjs +8 -8
- package/dist/types/Object.mjs +3 -3
- package/dist/types/PageList.mjs +8 -8
- package/dist/types/Parser.mjs +7 -7
- package/dist/types/Period.d.ts +2 -0
- package/dist/types/Period.mjs +29 -0
- package/dist/types/Period.mjs.map +1 -0
- package/dist/types/Repository.mjs +8 -8
- package/dist/types/Result.mjs +7 -7
- package/dist/types/Results.mjs +7 -7
- package/dist/types/Tag.mjs +4 -4
- package/dist/types/Template.mjs +7 -7
- package/dist/types/Timezone.d.ts +15 -0
- package/dist/types/Timezone.mjs +14 -0
- package/dist/types/Timezone.mjs.map +1 -0
- package/dist/types/ToText.mjs +7 -7
- package/dist/types/Try.mjs +7 -7
- package/dist/types/Uri.mjs +7 -7
- package/dist/utils/If.mjs +2 -2
- package/dist/utils/Mapper.mjs +6 -6
- package/dist/utils/Period.d.ts +13 -0
- package/dist/utils/Period.mjs +59 -0
- package/dist/utils/Period.mjs.map +1 -0
- package/dist/utils/Promise.mjs +4 -4
- package/dist/utils/Seconds.mjs +3 -3
- package/dist/utils/Sentence.mjs +7 -7
- package/dist/utils/View.mjs +11 -11
- package/dist/validation/Contraints.mjs +8 -8
- package/dist/validation/Validate.mjs +7 -7
- package/dist/validation/When.mjs +7 -7
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/types/Period.ts +24 -0
- package/src/types/Timezone.ts +28 -0
- package/src/utils/Period.ts +59 -0
- /package/dist/{chunk-KHB4I7CQ.mjs.map → chunk-4BMUPWAJ.mjs.map} +0 -0
- /package/dist/{chunk-2J4JWSYC.mjs.map → chunk-4PQAGLRK.mjs.map} +0 -0
- /package/dist/{chunk-MU6KQ7PB.mjs.map → chunk-4XY7L4GK.mjs.map} +0 -0
- /package/dist/{chunk-6HZZB2X6.mjs.map → chunk-5OHYO5NV.mjs.map} +0 -0
- /package/dist/{chunk-P6HFLY47.mjs.map → chunk-5SA3LDLX.mjs.map} +0 -0
- /package/dist/{chunk-65N5GWGU.mjs.map → chunk-6XYEP3PI.mjs.map} +0 -0
- /package/dist/{chunk-WMYDNAUS.mjs.map → chunk-7SLDERPB.mjs.map} +0 -0
- /package/dist/{chunk-G4ZI3RMH.mjs.map → chunk-AHTAM4NJ.mjs.map} +0 -0
- /package/dist/{chunk-CQXTVAXK.mjs.map → chunk-AU4TT4W7.mjs.map} +0 -0
- /package/dist/{chunk-2IDALCMP.mjs.map → chunk-DFYAOK6M.mjs.map} +0 -0
- /package/dist/{chunk-HQEQZNIW.mjs.map → chunk-EVG23WHU.mjs.map} +0 -0
- /package/dist/{chunk-EBVCNYJM.mjs.map → chunk-FIIA7ENW.mjs.map} +0 -0
- /package/dist/{chunk-ZXEJWSGG.mjs.map → chunk-GJGGFAOR.mjs.map} +0 -0
- /package/dist/{chunk-YPGKP4EG.mjs.map → chunk-HTWGHZHY.mjs.map} +0 -0
- /package/dist/{chunk-HOHEXP7R.mjs.map → chunk-I2TZE77T.mjs.map} +0 -0
- /package/dist/{chunk-E37FO7JM.mjs.map → chunk-JA4LHFAJ.mjs.map} +0 -0
- /package/dist/{chunk-VWHLBVRP.mjs.map → chunk-JKA6TS2W.mjs.map} +0 -0
- /package/dist/{chunk-KIBIS5RL.mjs.map → chunk-JOVRTPGK.mjs.map} +0 -0
- /package/dist/{chunk-72X4GRZS.mjs.map → chunk-KJTUEU2S.mjs.map} +0 -0
- /package/dist/{chunk-KWET43K6.mjs.map → chunk-KRGEMORR.mjs.map} +0 -0
- /package/dist/{chunk-P62INSZI.mjs.map → chunk-LCKMOXL4.mjs.map} +0 -0
- /package/dist/{chunk-OXCNYART.mjs.map → chunk-LTTIVS2R.mjs.map} +0 -0
- /package/dist/{chunk-H5VLAHK3.mjs.map → chunk-M4SESBLT.mjs.map} +0 -0
- /package/dist/{chunk-BYGVL3C5.mjs.map → chunk-MKZLN3EP.mjs.map} +0 -0
- /package/dist/{chunk-XLXPPD64.mjs.map → chunk-NRMUNBNT.mjs.map} +0 -0
- /package/dist/{chunk-TU6OXP22.mjs.map → chunk-O547ZFYP.mjs.map} +0 -0
- /package/dist/{chunk-754SQGUB.mjs.map → chunk-PLIJRFFH.mjs.map} +0 -0
- /package/dist/{chunk-DHIYFYVE.mjs.map → chunk-QJBH2BQG.mjs.map} +0 -0
- /package/dist/{chunk-WM4PAINX.mjs.map → chunk-RRCOMMYB.mjs.map} +0 -0
- /package/dist/{chunk-FVA6DUVX.mjs.map → chunk-RYWDUDTJ.mjs.map} +0 -0
- /package/dist/{chunk-3WZHV3BO.mjs.map → chunk-SHEJ7PNI.mjs.map} +0 -0
- /package/dist/{chunk-V4FY3P2Z.mjs.map → chunk-STBIY75D.mjs.map} +0 -0
- /package/dist/{chunk-4MTV5YJB.mjs.map → chunk-VDDHUQPK.mjs.map} +0 -0
- /package/dist/{chunk-XDE25I6E.mjs.map → chunk-VTXFZ2S3.mjs.map} +0 -0
- /package/dist/{chunk-J7YL4RXZ.mjs.map → chunk-WGWMLY7Q.mjs.map} +0 -0
- /package/dist/{chunk-QMZVL3AZ.mjs.map → chunk-WPHQRWHF.mjs.map} +0 -0
- /package/dist/{chunk-MBSQZ6FC.mjs.map → chunk-WT6TNFBH.mjs.map} +0 -0
- /package/dist/{chunk-6F2F4M4L.mjs.map → chunk-XL5HGL2Q.mjs.map} +0 -0
- /package/dist/{chunk-TZXUZ7XN.mjs.map → chunk-YTNVFND2.mjs.map} +0 -0
- /package/dist/{chunk-HJHUZJZL.mjs.map → chunk-YXAXW4CU.mjs.map} +0 -0
- /package/dist/{chunk-AAYDOFEY.mjs.map → chunk-ZMJMSJO7.mjs.map} +0 -0
package/dist/types/Template.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Template,
|
|
3
3
|
template
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OXCNYART.mjs";
|
|
4
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
6
5
|
import "../chunk-OFGI5FLG.mjs";
|
|
6
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
7
7
|
import "../chunk-4262V2GR.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-SSROJBD5.mjs";
|
|
8
|
+
import "../chunk-EVG23WHU.mjs";
|
|
9
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
10
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
11
|
+
import "../chunk-YTNVFND2.mjs";
|
|
13
12
|
import "../chunk-CO2AFYVD.mjs";
|
|
13
|
+
import "../chunk-SSROJBD5.mjs";
|
|
14
14
|
import "../chunk-TOERQZRP.mjs";
|
|
15
15
|
import "../chunk-SJGQU3OG.mjs";
|
|
16
16
|
import "../chunk-ZHXKBOK2.mjs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const timezones: readonly ["utc", "Europe/Amsterdam", "Europe/Berlin", "Europe/Brussels", "Europe/London", "Europe/Paris", "Europe/Vienna", "Europe/Warsaw", "America/New_York"];
|
|
2
|
+
export type Timezone = (typeof timezones)[number];
|
|
3
|
+
export declare const timezone: {
|
|
4
|
+
utc: Timezone;
|
|
5
|
+
amsterdam: Timezone;
|
|
6
|
+
berlin: Timezone;
|
|
7
|
+
brussels: Timezone;
|
|
8
|
+
london: Timezone;
|
|
9
|
+
paris: Timezone;
|
|
10
|
+
vienna: Timezone;
|
|
11
|
+
warsaw: Timezone;
|
|
12
|
+
newYork: Timezone;
|
|
13
|
+
};
|
|
14
|
+
export declare const utc: "utc" | "Europe/Amsterdam" | "America/New_York" | "Europe/London" | "Europe/Warsaw" | "Europe/Berlin" | "Europe/Brussels" | "Europe/Paris" | "Europe/Vienna";
|
|
15
|
+
export declare const ams: "utc" | "Europe/Amsterdam" | "America/New_York" | "Europe/London" | "Europe/Warsaw" | "Europe/Berlin" | "Europe/Brussels" | "Europe/Paris" | "Europe/Vienna";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/ToText.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
ToText,
|
|
3
3
|
text,
|
|
4
4
|
textValue
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-OXCNYART.mjs";
|
|
5
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
7
6
|
import "../chunk-OFGI5FLG.mjs";
|
|
7
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
8
8
|
import "../chunk-4262V2GR.mjs";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-SSROJBD5.mjs";
|
|
9
|
+
import "../chunk-EVG23WHU.mjs";
|
|
10
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
11
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
12
|
+
import "../chunk-YTNVFND2.mjs";
|
|
14
13
|
import "../chunk-CO2AFYVD.mjs";
|
|
14
|
+
import "../chunk-SSROJBD5.mjs";
|
|
15
15
|
import "../chunk-TOERQZRP.mjs";
|
|
16
16
|
import "../chunk-SJGQU3OG.mjs";
|
|
17
17
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/types/Try.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Try,
|
|
3
3
|
tryTo
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OXCNYART.mjs";
|
|
4
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
6
5
|
import "../chunk-OFGI5FLG.mjs";
|
|
6
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
7
7
|
import "../chunk-4262V2GR.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-SSROJBD5.mjs";
|
|
8
|
+
import "../chunk-EVG23WHU.mjs";
|
|
9
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
10
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
11
|
+
import "../chunk-YTNVFND2.mjs";
|
|
13
12
|
import "../chunk-CO2AFYVD.mjs";
|
|
13
|
+
import "../chunk-SSROJBD5.mjs";
|
|
14
14
|
import "../chunk-TOERQZRP.mjs";
|
|
15
15
|
import "../chunk-SJGQU3OG.mjs";
|
|
16
16
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/types/Uri.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ctx,
|
|
3
3
|
tryTo
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OXCNYART.mjs";
|
|
4
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
6
5
|
import "../chunk-OFGI5FLG.mjs";
|
|
6
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
7
7
|
import "../chunk-4262V2GR.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-EVG23WHU.mjs";
|
|
9
9
|
import {
|
|
10
10
|
meta
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-VTXFZ2S3.mjs";
|
|
12
12
|
import {
|
|
13
13
|
entries
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-4PQAGLRK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
toList
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-SSROJBD5.mjs";
|
|
17
|
+
} from "../chunk-YTNVFND2.mjs";
|
|
19
18
|
import {
|
|
20
19
|
toArray
|
|
21
20
|
} from "../chunk-CO2AFYVD.mjs";
|
|
21
|
+
import "../chunk-SSROJBD5.mjs";
|
|
22
22
|
import {
|
|
23
23
|
asString
|
|
24
24
|
} from "../chunk-TOERQZRP.mjs";
|
package/dist/utils/If.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ifFalse,
|
|
5
5
|
ifNotEmpty,
|
|
6
6
|
ifTrue
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-SSROJBD5.mjs";
|
|
7
|
+
} from "../chunk-YTNVFND2.mjs";
|
|
9
8
|
import "../chunk-CO2AFYVD.mjs";
|
|
9
|
+
import "../chunk-SSROJBD5.mjs";
|
|
10
10
|
import "../chunk-TOERQZRP.mjs";
|
|
11
11
|
import "../chunk-SJGQU3OG.mjs";
|
|
12
12
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/utils/Mapper.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
Mapper,
|
|
3
3
|
isMapping,
|
|
4
4
|
mappings
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-AU4TT4W7.mjs";
|
|
6
6
|
import "../chunk-WJZFE5NE.mjs";
|
|
7
7
|
import "../chunk-LGPKT5JC.mjs";
|
|
8
8
|
import "../chunk-QZTS3WY5.mjs";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-SSROJBD5.mjs";
|
|
9
|
+
import "../chunk-YXAXW4CU.mjs";
|
|
10
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
11
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
12
|
+
import "../chunk-YTNVFND2.mjs";
|
|
14
13
|
import "../chunk-CO2AFYVD.mjs";
|
|
14
|
+
import "../chunk-SSROJBD5.mjs";
|
|
15
15
|
import "../chunk-TOERQZRP.mjs";
|
|
16
16
|
import "../chunk-SJGQU3OG.mjs";
|
|
17
17
|
import "../chunk-ZHXKBOK2.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DateTime } from '../domain/DateTime';
|
|
2
|
+
import { Period } from '../types/Period';
|
|
3
|
+
export type StartEnd = {
|
|
4
|
+
start: DateTime;
|
|
5
|
+
end: DateTime;
|
|
6
|
+
};
|
|
7
|
+
export type StartEndOptions = {
|
|
8
|
+
period?: Period;
|
|
9
|
+
start?: DateTime;
|
|
10
|
+
end?: DateTime;
|
|
11
|
+
zone?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const toStartEnd: ({ period, start, end, zone }: StartEndOptions) => StartEnd;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
utc
|
|
3
|
+
} from "../chunk-O3UNRTSC.mjs";
|
|
4
|
+
import {
|
|
5
|
+
DateTime
|
|
6
|
+
} from "../chunk-KJTUEU2S.mjs";
|
|
7
|
+
import "../chunk-4BMUPWAJ.mjs";
|
|
8
|
+
import "../chunk-ADJAEGCT.mjs";
|
|
9
|
+
import {
|
|
10
|
+
choose
|
|
11
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
12
|
+
import "../chunk-OFGI5FLG.mjs";
|
|
13
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
14
|
+
import "../chunk-4262V2GR.mjs";
|
|
15
|
+
import "../chunk-EVG23WHU.mjs";
|
|
16
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
17
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
18
|
+
import "../chunk-YTNVFND2.mjs";
|
|
19
|
+
import "../chunk-CO2AFYVD.mjs";
|
|
20
|
+
import "../chunk-SSROJBD5.mjs";
|
|
21
|
+
import "../chunk-TOERQZRP.mjs";
|
|
22
|
+
import "../chunk-SJGQU3OG.mjs";
|
|
23
|
+
import "../chunk-ZHXKBOK2.mjs";
|
|
24
|
+
import "../chunk-ZPNFXK7Y.mjs";
|
|
25
|
+
import "../chunk-DXQSIBC7.mjs";
|
|
26
|
+
import "../chunk-PIRWVOO2.mjs";
|
|
27
|
+
import "../chunk-DEJ7A5PY.mjs";
|
|
28
|
+
import "../chunk-4N72FQFX.mjs";
|
|
29
|
+
|
|
30
|
+
// src/utils/Period.ts
|
|
31
|
+
var toStartEnd = ({ period, start, end, zone = utc }) => {
|
|
32
|
+
const today = DateTime.now.withZone(zone).startOf("day");
|
|
33
|
+
return choose(period).equals("today", { start: today, end: today.endOf("day") }).equals("yesterday", { start: today.subtract(1, "day"), end: today }).equals("tomorrow", { start: today.add(1, "day"), end: today.add(1, "day").endOf("day") }).equals("this-week", { start: today.startOf("week"), end: today.endOf("week") }).equals("last-seven-days", { start: today.subtract(6, "day"), end: today.endOf("day") }).equals("last-week", {
|
|
34
|
+
start: today.subtract(1, "week").startOf("week"),
|
|
35
|
+
end: today.subtract(1, "week").endOf("week")
|
|
36
|
+
}).equals("last-two-weeks", { start: today.subtract(13, "day"), end: today.endOf("day") }).equals("last-month", {
|
|
37
|
+
start: today.subtract(1, "month").startOf("month"),
|
|
38
|
+
end: today.subtract(1, "month").endOf("month")
|
|
39
|
+
}).equals("next-week", { start: today.add(1, "week").startOf("week"), end: today.add(1, "week").endOf("week") }).equals("this-month", { start: today.startOf("month"), end: today.endOf("month") }).equals("three-months-ago", {
|
|
40
|
+
start: today.subtract(3, "month").startOf("month"),
|
|
41
|
+
end: today.subtract(3, "month").endOf("month")
|
|
42
|
+
}).equals("two-months-ago", {
|
|
43
|
+
start: today.subtract(2, "month").startOf("month"),
|
|
44
|
+
end: today.subtract(2, "month").endOf("month")
|
|
45
|
+
}).equals("last-three-months", { start: today.subtract(3, "month"), end: today.endOf("day") }).equals("next-month", { start: today.add(1, "month").startOf("month"), end: today.add(1, "month").endOf("month") }).equals("this-year", { start: today.startOf("year"), end: today.endOf("year") }).equals("last-year", {
|
|
46
|
+
start: today.subtract(1, "year").startOf("year"),
|
|
47
|
+
end: today.subtract(1, "year").endOf("year")
|
|
48
|
+
}).equals("two-years-ago", {
|
|
49
|
+
start: today.subtract(2, "year").startOf("year"),
|
|
50
|
+
end: today.subtract(2, "year").endOf("year")
|
|
51
|
+
}).equals("three-years-ago", {
|
|
52
|
+
start: today.subtract(3, "year").startOf("year"),
|
|
53
|
+
end: today.subtract(3, "year").endOf("year")
|
|
54
|
+
}).equals("next-year", { start: today.add(1, "year").startOf("year"), end: today.add(1, "year").endOf("year") }).equals("all-time", { start: new DateTime(0).withZone(zone), end: today.endOf("day") }).else({ start: start ?? today, end: end ?? today.endOf("day") });
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
toStartEnd
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=Period.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/Period.ts"],"sourcesContent":["import { choose } from '../types/Case';\nimport { DateTime } from '../domain/DateTime';\nimport { Period } from '../types/Period';\nimport { utc } from '../types/Timezone';\n\nexport type StartEnd = { start: DateTime; end: DateTime };\n\nexport type StartEndOptions = {\n period?: Period;\n start?: DateTime;\n end?: DateTime;\n zone?: string;\n};\nexport const toStartEnd = ({ period, start, end, zone = utc }: StartEndOptions): StartEnd => {\n const today = DateTime.now.withZone(zone).startOf('day');\n return choose(period)\n .equals('today', { start: today, end: today.endOf('day') })\n .equals('yesterday', { start: today.subtract(1, 'day'), end: today })\n .equals('tomorrow', { start: today.add(1, 'day'), end: today.add(1, 'day').endOf('day') })\n .equals('this-week', { start: today.startOf('week'), end: today.endOf('week') })\n .equals('last-seven-days', { start: today.subtract(6, 'day'), end: today.endOf('day') })\n .equals('last-week', {\n start: today.subtract(1, 'week').startOf('week'),\n end: today.subtract(1, 'week').endOf('week'),\n })\n .equals('last-two-weeks', { start: today.subtract(13, 'day'), end: today.endOf('day') })\n .equals('last-month', {\n start: today.subtract(1, 'month').startOf('month'),\n end: today.subtract(1, 'month').endOf('month'),\n })\n .equals('next-week', { start: today.add(1, 'week').startOf('week'), end: today.add(1, 'week').endOf('week') })\n .equals('this-month', { start: today.startOf('month'), end: today.endOf('month') })\n .equals('three-months-ago', {\n start: today.subtract(3, 'month').startOf('month'),\n end: today.subtract(3, 'month').endOf('month'),\n })\n .equals('two-months-ago', {\n start: today.subtract(2, 'month').startOf('month'),\n end: today.subtract(2, 'month').endOf('month'),\n })\n .equals('last-three-months', { start: today.subtract(3, 'month'), end: today.endOf('day') })\n .equals('next-month', { start: today.add(1, 'month').startOf('month'), end: today.add(1, 'month').endOf('month') })\n .equals('this-year', { start: today.startOf('year'), end: today.endOf('year') })\n .equals('last-year', {\n start: today.subtract(1, 'year').startOf('year'),\n end: today.subtract(1, 'year').endOf('year'),\n })\n .equals('two-years-ago', {\n start: today.subtract(2, 'year').startOf('year'),\n end: today.subtract(2, 'year').endOf('year'),\n })\n .equals('three-years-ago', {\n start: today.subtract(3, 'year').startOf('year'),\n end: today.subtract(3, 'year').endOf('year'),\n })\n .equals('next-year', { start: today.add(1, 'year').startOf('year'), end: today.add(1, 'year').endOf('year') })\n .equals('all-time', { start: new DateTime(0).withZone(zone), end: today.endOf('day') })\n .else({ start: start ?? today, end: end ?? today.endOf('day') });\n};\n"],"mappings":"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","names":[]}
|
package/dist/utils/Promise.mjs
CHANGED
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
tuple4,
|
|
9
9
|
tuple5,
|
|
10
10
|
tupleO
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-SSROJBD5.mjs";
|
|
11
|
+
} from "../chunk-LTTIVS2R.mjs";
|
|
12
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
13
|
+
import "../chunk-YTNVFND2.mjs";
|
|
15
14
|
import "../chunk-CO2AFYVD.mjs";
|
|
15
|
+
import "../chunk-SSROJBD5.mjs";
|
|
16
16
|
import "../chunk-TOERQZRP.mjs";
|
|
17
17
|
import "../chunk-SJGQU3OG.mjs";
|
|
18
18
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/utils/Seconds.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seconds
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-SSROJBD5.mjs";
|
|
3
|
+
} from "../chunk-4BMUPWAJ.mjs";
|
|
4
|
+
import "../chunk-YTNVFND2.mjs";
|
|
6
5
|
import "../chunk-CO2AFYVD.mjs";
|
|
6
|
+
import "../chunk-SSROJBD5.mjs";
|
|
7
7
|
import "../chunk-TOERQZRP.mjs";
|
|
8
8
|
import "../chunk-SJGQU3OG.mjs";
|
|
9
9
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/utils/Sentence.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
text
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-OXCNYART.mjs";
|
|
3
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
5
4
|
import "../chunk-OFGI5FLG.mjs";
|
|
5
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
6
6
|
import "../chunk-4262V2GR.mjs";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-SSROJBD5.mjs";
|
|
7
|
+
import "../chunk-EVG23WHU.mjs";
|
|
8
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
9
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
10
|
+
import "../chunk-YTNVFND2.mjs";
|
|
12
11
|
import "../chunk-CO2AFYVD.mjs";
|
|
12
|
+
import "../chunk-SSROJBD5.mjs";
|
|
13
13
|
import "../chunk-TOERQZRP.mjs";
|
|
14
14
|
import "../chunk-SJGQU3OG.mjs";
|
|
15
15
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/utils/View.mjs
CHANGED
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
toViewer,
|
|
5
5
|
view,
|
|
6
6
|
views
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-OXCNYART.mjs";
|
|
7
|
+
} from "../chunk-LCKMOXL4.mjs";
|
|
8
|
+
import "../chunk-I2TZE77T.mjs";
|
|
9
|
+
import "../chunk-RRCOMMYB.mjs";
|
|
10
|
+
import "../chunk-YXAXW4CU.mjs";
|
|
11
|
+
import "../chunk-NRMUNBNT.mjs";
|
|
13
12
|
import "../chunk-OFGI5FLG.mjs";
|
|
13
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
14
14
|
import "../chunk-4262V2GR.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-SSROJBD5.mjs";
|
|
15
|
+
import "../chunk-EVG23WHU.mjs";
|
|
16
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
17
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
18
|
+
import "../chunk-YTNVFND2.mjs";
|
|
20
19
|
import "../chunk-CO2AFYVD.mjs";
|
|
20
|
+
import "../chunk-SSROJBD5.mjs";
|
|
21
21
|
import "../chunk-TOERQZRP.mjs";
|
|
22
22
|
import "../chunk-SJGQU3OG.mjs";
|
|
23
23
|
import "../chunk-ZHXKBOK2.mjs";
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
required,
|
|
19
19
|
rule,
|
|
20
20
|
valid
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-7SLDERPB.mjs";
|
|
22
22
|
import "../chunk-ADJAEGCT.mjs";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-OXCNYART.mjs";
|
|
23
|
+
import "../chunk-NRMUNBNT.mjs";
|
|
25
24
|
import "../chunk-OFGI5FLG.mjs";
|
|
25
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
26
26
|
import "../chunk-4262V2GR.mjs";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-SSROJBD5.mjs";
|
|
27
|
+
import "../chunk-EVG23WHU.mjs";
|
|
28
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
29
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
30
|
+
import "../chunk-YTNVFND2.mjs";
|
|
32
31
|
import "../chunk-CO2AFYVD.mjs";
|
|
32
|
+
import "../chunk-SSROJBD5.mjs";
|
|
33
33
|
import "../chunk-TOERQZRP.mjs";
|
|
34
34
|
import "../chunk-SJGQU3OG.mjs";
|
|
35
35
|
import "../chunk-ZHXKBOK2.mjs";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
isValid,
|
|
4
4
|
validate,
|
|
5
5
|
validateReject
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-OXCNYART.mjs";
|
|
6
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
8
7
|
import "../chunk-OFGI5FLG.mjs";
|
|
8
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
9
9
|
import "../chunk-4262V2GR.mjs";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-SSROJBD5.mjs";
|
|
10
|
+
import "../chunk-EVG23WHU.mjs";
|
|
11
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
12
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
13
|
+
import "../chunk-YTNVFND2.mjs";
|
|
15
14
|
import "../chunk-CO2AFYVD.mjs";
|
|
15
|
+
import "../chunk-SSROJBD5.mjs";
|
|
16
16
|
import "../chunk-TOERQZRP.mjs";
|
|
17
17
|
import "../chunk-SJGQU3OG.mjs";
|
|
18
18
|
import "../chunk-ZHXKBOK2.mjs";
|
package/dist/validation/When.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
When,
|
|
3
3
|
when
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OXCNYART.mjs";
|
|
4
|
+
} from "../chunk-NRMUNBNT.mjs";
|
|
6
5
|
import "../chunk-OFGI5FLG.mjs";
|
|
6
|
+
import "../chunk-LTTIVS2R.mjs";
|
|
7
7
|
import "../chunk-4262V2GR.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-SSROJBD5.mjs";
|
|
8
|
+
import "../chunk-EVG23WHU.mjs";
|
|
9
|
+
import "../chunk-VTXFZ2S3.mjs";
|
|
10
|
+
import "../chunk-4PQAGLRK.mjs";
|
|
11
|
+
import "../chunk-YTNVFND2.mjs";
|
|
13
12
|
import "../chunk-CO2AFYVD.mjs";
|
|
13
|
+
import "../chunk-SSROJBD5.mjs";
|
|
14
14
|
import "../chunk-TOERQZRP.mjs";
|
|
15
15
|
import "../chunk-SJGQU3OG.mjs";
|
|
16
16
|
import "../chunk-ZHXKBOK2.mjs";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -88,6 +88,7 @@ export * from './types/Number';
|
|
|
88
88
|
export * from './types/Object';
|
|
89
89
|
export * from './types/PageList';
|
|
90
90
|
export * from './types/Parser';
|
|
91
|
+
export * from './types/Period';
|
|
91
92
|
export * from './types/Primitive';
|
|
92
93
|
export * from './types/Repository';
|
|
93
94
|
export * from './types/Result';
|
|
@@ -96,6 +97,7 @@ export * from './types/Sort';
|
|
|
96
97
|
export * from './types/Tag';
|
|
97
98
|
export * from './types/Template';
|
|
98
99
|
export * from './types/Text';
|
|
100
|
+
export * from './types/Timezone';
|
|
99
101
|
export * from './types/Try';
|
|
100
102
|
export * from './types/TypeGuard';
|
|
101
103
|
export * from './types/Types';
|
|
@@ -110,6 +112,7 @@ export * from './utils/If';
|
|
|
110
112
|
export * from './utils/Loading';
|
|
111
113
|
export * from './utils/Log';
|
|
112
114
|
export * from './utils/Mapper';
|
|
115
|
+
export * from './utils/Period';
|
|
113
116
|
export * from './utils/Promise';
|
|
114
117
|
export * from './utils/Property';
|
|
115
118
|
export * from './utils/Seconds';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const period = [
|
|
2
|
+
'today',
|
|
3
|
+
'yesterday',
|
|
4
|
+
'tomorrow',
|
|
5
|
+
'this-week',
|
|
6
|
+
'last-seven-days',
|
|
7
|
+
'last-week',
|
|
8
|
+
'last-two-weeks',
|
|
9
|
+
'next-week',
|
|
10
|
+
'this-month',
|
|
11
|
+
'last-month',
|
|
12
|
+
'two-months-ago',
|
|
13
|
+
'three-months-ago',
|
|
14
|
+
'last-three-months',
|
|
15
|
+
'next-month',
|
|
16
|
+
'this-year',
|
|
17
|
+
'last-year',
|
|
18
|
+
'two-years-ago',
|
|
19
|
+
'three-years-ago',
|
|
20
|
+
'next-year',
|
|
21
|
+
'all-time',
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
export type Period = (typeof period)[number];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const timezones = [
|
|
2
|
+
'utc',
|
|
3
|
+
'Europe/Amsterdam',
|
|
4
|
+
'Europe/Berlin',
|
|
5
|
+
'Europe/Brussels',
|
|
6
|
+
'Europe/London',
|
|
7
|
+
'Europe/Paris',
|
|
8
|
+
'Europe/Vienna',
|
|
9
|
+
'Europe/Warsaw',
|
|
10
|
+
'America/New_York',
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
export type Timezone = (typeof timezones)[number];
|
|
14
|
+
|
|
15
|
+
export const timezone = {
|
|
16
|
+
utc: 'utc' as Timezone,
|
|
17
|
+
amsterdam: 'Europe/Amsterdam' as Timezone,
|
|
18
|
+
berlin: 'Europe/Berlin' as Timezone,
|
|
19
|
+
brussels: 'Europe/Brussels' as Timezone,
|
|
20
|
+
london: 'Europe/London' as Timezone,
|
|
21
|
+
paris: 'Europe/Paris' as Timezone,
|
|
22
|
+
vienna: 'Europe/Vienna' as Timezone,
|
|
23
|
+
warsaw: 'Europe/Warsaw' as Timezone,
|
|
24
|
+
newYork: 'America/New_York' as Timezone,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const utc = timezone.utc;
|
|
28
|
+
export const ams = timezone.amsterdam;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { choose } from '../types/Case';
|
|
2
|
+
import { DateTime } from '../domain/DateTime';
|
|
3
|
+
import { Period } from '../types/Period';
|
|
4
|
+
import { utc } from '../types/Timezone';
|
|
5
|
+
|
|
6
|
+
export type StartEnd = { start: DateTime; end: DateTime };
|
|
7
|
+
|
|
8
|
+
export type StartEndOptions = {
|
|
9
|
+
period?: Period;
|
|
10
|
+
start?: DateTime;
|
|
11
|
+
end?: DateTime;
|
|
12
|
+
zone?: string;
|
|
13
|
+
};
|
|
14
|
+
export const toStartEnd = ({ period, start, end, zone = utc }: StartEndOptions): StartEnd => {
|
|
15
|
+
const today = DateTime.now.withZone(zone).startOf('day');
|
|
16
|
+
return choose(period)
|
|
17
|
+
.equals('today', { start: today, end: today.endOf('day') })
|
|
18
|
+
.equals('yesterday', { start: today.subtract(1, 'day'), end: today })
|
|
19
|
+
.equals('tomorrow', { start: today.add(1, 'day'), end: today.add(1, 'day').endOf('day') })
|
|
20
|
+
.equals('this-week', { start: today.startOf('week'), end: today.endOf('week') })
|
|
21
|
+
.equals('last-seven-days', { start: today.subtract(6, 'day'), end: today.endOf('day') })
|
|
22
|
+
.equals('last-week', {
|
|
23
|
+
start: today.subtract(1, 'week').startOf('week'),
|
|
24
|
+
end: today.subtract(1, 'week').endOf('week'),
|
|
25
|
+
})
|
|
26
|
+
.equals('last-two-weeks', { start: today.subtract(13, 'day'), end: today.endOf('day') })
|
|
27
|
+
.equals('last-month', {
|
|
28
|
+
start: today.subtract(1, 'month').startOf('month'),
|
|
29
|
+
end: today.subtract(1, 'month').endOf('month'),
|
|
30
|
+
})
|
|
31
|
+
.equals('next-week', { start: today.add(1, 'week').startOf('week'), end: today.add(1, 'week').endOf('week') })
|
|
32
|
+
.equals('this-month', { start: today.startOf('month'), end: today.endOf('month') })
|
|
33
|
+
.equals('three-months-ago', {
|
|
34
|
+
start: today.subtract(3, 'month').startOf('month'),
|
|
35
|
+
end: today.subtract(3, 'month').endOf('month'),
|
|
36
|
+
})
|
|
37
|
+
.equals('two-months-ago', {
|
|
38
|
+
start: today.subtract(2, 'month').startOf('month'),
|
|
39
|
+
end: today.subtract(2, 'month').endOf('month'),
|
|
40
|
+
})
|
|
41
|
+
.equals('last-three-months', { start: today.subtract(3, 'month'), end: today.endOf('day') })
|
|
42
|
+
.equals('next-month', { start: today.add(1, 'month').startOf('month'), end: today.add(1, 'month').endOf('month') })
|
|
43
|
+
.equals('this-year', { start: today.startOf('year'), end: today.endOf('year') })
|
|
44
|
+
.equals('last-year', {
|
|
45
|
+
start: today.subtract(1, 'year').startOf('year'),
|
|
46
|
+
end: today.subtract(1, 'year').endOf('year'),
|
|
47
|
+
})
|
|
48
|
+
.equals('two-years-ago', {
|
|
49
|
+
start: today.subtract(2, 'year').startOf('year'),
|
|
50
|
+
end: today.subtract(2, 'year').endOf('year'),
|
|
51
|
+
})
|
|
52
|
+
.equals('three-years-ago', {
|
|
53
|
+
start: today.subtract(3, 'year').startOf('year'),
|
|
54
|
+
end: today.subtract(3, 'year').endOf('year'),
|
|
55
|
+
})
|
|
56
|
+
.equals('next-year', { start: today.add(1, 'year').startOf('year'), end: today.add(1, 'year').endOf('year') })
|
|
57
|
+
.equals('all-time', { start: new DateTime(0).withZone(zone), end: today.endOf('day') })
|
|
58
|
+
.else({ start: start ?? today, end: end ?? today.endOf('day') });
|
|
59
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|