day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem

This commit is contained in:
2024-11-05 15:02:53 +07:00
parent 0f68b51d75
commit 56ba2808c8
22 changed files with 482 additions and 63 deletions

View File

@@ -60,6 +60,20 @@ export class DateTimeUtils {
)
}
static isOverlaps(
listA: { start: DateTime; end: DateTime }[],
listB: { start: DateTime; end: DateTime }[],
): boolean {
for (const a of listA) {
for (const b of listB) {
if (this.isOverlap(a.start, a.end, b.start, b.end)) {
return true
}
}
}
return false
}
static fromIsoString(isoString: string): DateTime {
const dateTime = DateTime.fromISO(isoString)
if (!dateTime.isValid) {