@bgord/tools 0.12.9 → 0.12.10
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/day.vo.js +2 -1
- package/dist/dll.service.js +0 -1
- package/dist/week.vo.d.ts +0 -1
- package/dist/week.vo.js +0 -3
- package/package.json +2 -2
- package/src/day.vo.ts +2 -1
- package/src/dll.service.ts +0 -1
- package/src/money.vo.ts +0 -1
- package/src/reordering.service.ts +0 -1
- package/src/revision.vo.ts +0 -1
- package/src/size.vo.ts +0 -1
- package/src/week.vo.ts +0 -4
package/dist/day.vo.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { endOfDay, startOfDay } from "date-fns";
|
|
2
2
|
import { DateRange } from "./date-range.vo";
|
|
3
3
|
import { DayIsoId } from "./day-iso-id.vo";
|
|
4
|
+
import { Time } from "./time.service";
|
|
4
5
|
import { Timestamp } from "./timestamp.vo";
|
|
5
6
|
export class Day extends DateRange {
|
|
6
7
|
constructor(start, end) {
|
|
7
8
|
super(start, end);
|
|
8
9
|
}
|
|
9
10
|
toIsoId() {
|
|
10
|
-
return new Date(this.getStart()).toISOString().slice(0, 10);
|
|
11
|
+
return new Date(this.getStart() + Time.Hours(12).ms).toISOString().slice(0, 10);
|
|
11
12
|
}
|
|
12
13
|
static fromTimestamp(timestamp) {
|
|
13
14
|
const start = Timestamp.parse(startOfDay(timestamp).getTime());
|
package/dist/dll.service.js
CHANGED
package/dist/week.vo.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { DateRange } from "./date-range.vo";
|
|
|
2
2
|
import { TimestampType } from "./timestamp.vo";
|
|
3
3
|
import { WeekIsoIdType } from "./week-iso-id.vo";
|
|
4
4
|
export declare class Week extends DateRange {
|
|
5
|
-
constructor(start: TimestampType, end: TimestampType);
|
|
6
5
|
toIsoId(): WeekIsoIdType;
|
|
7
6
|
static fromTimestamp(timestamp: TimestampType): Week;
|
|
8
7
|
static fromNow(now?: TimestampType): Week;
|
package/dist/week.vo.js
CHANGED
|
@@ -3,9 +3,6 @@ import { DateRange } from "./date-range.vo";
|
|
|
3
3
|
import { Timestamp } from "./timestamp.vo";
|
|
4
4
|
import { WeekIsoId } from "./week-iso-id.vo";
|
|
5
5
|
export class Week extends DateRange {
|
|
6
|
-
constructor(start, end) {
|
|
7
|
-
super(start, end);
|
|
8
|
-
}
|
|
9
6
|
toIsoId() {
|
|
10
7
|
const year = getISOWeekYear(this.getStart());
|
|
11
8
|
const week = getISOWeek(this.getStart()).toString().padStart(2, "0");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bgord/tools",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bartosz Gordon",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"preinstall": "bunx only-allow bun"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@biomejs/biome": "2.0
|
|
24
|
+
"@biomejs/biome": "2.2.0",
|
|
25
25
|
"@commitlint/cli": "19.8.1",
|
|
26
26
|
"@commitlint/config-conventional": "19.8.1",
|
|
27
27
|
"@types/bun": "1.2.20",
|
package/src/day.vo.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { endOfDay, startOfDay } from "date-fns";
|
|
2
2
|
import { DateRange } from "./date-range.vo";
|
|
3
3
|
import { DayIsoId, DayIsoIdType } from "./day-iso-id.vo";
|
|
4
|
+
import { Time } from "./time.service";
|
|
4
5
|
import { Timestamp, TimestampType } from "./timestamp.vo";
|
|
5
6
|
|
|
6
7
|
export class Day extends DateRange {
|
|
@@ -9,7 +10,7 @@ export class Day extends DateRange {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
toIsoId(): DayIsoIdType {
|
|
12
|
-
return new Date(this.getStart()).toISOString().slice(0, 10) as DayIsoIdType;
|
|
13
|
+
return new Date(this.getStart() + Time.Hours(12).ms).toISOString().slice(0, 10) as DayIsoIdType;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
static fromTimestamp(timestamp: TimestampType): Day {
|
package/src/dll.service.ts
CHANGED
package/src/money.vo.ts
CHANGED
package/src/revision.vo.ts
CHANGED
package/src/size.vo.ts
CHANGED
package/src/week.vo.ts
CHANGED
|
@@ -4,10 +4,6 @@ import { Timestamp, TimestampType } from "./timestamp.vo";
|
|
|
4
4
|
import { WeekIsoId, WeekIsoIdType } from "./week-iso-id.vo";
|
|
5
5
|
|
|
6
6
|
export class Week extends DateRange {
|
|
7
|
-
constructor(start: TimestampType, end: TimestampType) {
|
|
8
|
-
super(start, end);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
toIsoId(): WeekIsoIdType {
|
|
12
8
|
const year = getISOWeekYear(this.getStart());
|
|
13
9
|
const week = getISOWeek(this.getStart()).toString().padStart(2, "0");
|