Many improvements. Still no reactivity on List
This commit is contained in:
@@ -18,7 +18,7 @@ export function timeTuplesOverlapped(tuples: TimeTuple[]): Interval[] {
|
||||
return intervalsOverlapped(
|
||||
tuples.map((tuples) => {
|
||||
return {
|
||||
boatId: '',
|
||||
resource: '',
|
||||
start: '01/01/2001 ' + tuples[0],
|
||||
end: '01/01/2001 ' + tuples[1],
|
||||
};
|
||||
@@ -64,7 +64,7 @@ export function buildInterval(
|
||||
/* When the time zone offset is absent, date-only forms are interpreted
|
||||
as a UTC time and date-time forms are interpreted as local time. */
|
||||
const result = {
|
||||
boatId: resource.$id,
|
||||
resource: resource.$id,
|
||||
start: new Date(blockDate + 'T' + time[0]).toISOString(),
|
||||
end: new Date(blockDate + 'T' + time[1]).toISOString(),
|
||||
};
|
||||
@@ -83,3 +83,8 @@ export function formatDate(inputDate: string | undefined): string {
|
||||
if (!inputDate) return '';
|
||||
return date.formatDate(new Date(inputDate), 'ddd MMM Do hh:mm A');
|
||||
}
|
||||
|
||||
export function formatTime(inputDate: string | undefined): string {
|
||||
if (!inputDate) return '';
|
||||
return date.formatDate(new Date(inputDate), 'hh:mm A');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user