@arsedizioni/ars-utils 19.4.102 → 19.5.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, Directive, input, HostListener, output, Injectable, forwardRef, Pipe, EventEmitter, signal, RendererFactory2, computed, NgModule } from '@angular/core';
|
|
3
3
|
import { HttpParams } from '@angular/common/http';
|
|
4
|
-
import { parseISO, parse, format,
|
|
4
|
+
import { parseISO, parse, format, endOfDay, getYear, getMonth, getDate, getDay, getDaysInMonth, addYears, addMonths, addDays, formatISO, isDate, isValid } from 'date-fns';
|
|
5
5
|
import { it } from 'date-fns/locale';
|
|
6
6
|
import { TZDate } from '@date-fns/tz';
|
|
7
7
|
import { debounceTime } from 'rxjs/operators';
|
|
@@ -521,7 +521,7 @@ class SystemUtils {
|
|
|
521
521
|
return undefined;
|
|
522
522
|
else if (parts[1] !== 1 && parts[2] > 31)
|
|
523
523
|
return undefined;
|
|
524
|
-
return new
|
|
524
|
+
return new TZDate(parts[0], parts[1], parts[2], 12);
|
|
525
525
|
}
|
|
526
526
|
/**
|
|
527
527
|
* Format a date
|
|
@@ -574,7 +574,7 @@ class SystemUtils {
|
|
|
574
574
|
if (!(value instanceof Date && value.getTime()))
|
|
575
575
|
return undefined;
|
|
576
576
|
// Update date
|
|
577
|
-
return
|
|
577
|
+
return new TZDate(value, "Europe/Rome");
|
|
578
578
|
}
|
|
579
579
|
/**
|
|
580
580
|
* Update a DateInterval object according to a string
|