mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 16:02:40 +00:00
add mode to match wip
This commit is contained in:
@@ -43,37 +43,37 @@ export class CreateAdRequest {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
monTime: string | null;
|
||||
monTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
tueTime: string | null;
|
||||
tueTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
wedTime: string | null;
|
||||
wedTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
thuTime!: string | null;
|
||||
thuTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
friTime: string | null;
|
||||
friTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
satTime: string | null;
|
||||
satTime?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
sunTime: string | null;
|
||||
sunTime?: string | null;
|
||||
|
||||
@IsNumber()
|
||||
@AutoMap()
|
||||
@@ -127,7 +127,7 @@ export class CreateAdRequest {
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@AutoMap()
|
||||
seatsUsed: number;
|
||||
seatsUsed?: number;
|
||||
|
||||
@IsString()
|
||||
@AutoMap()
|
||||
@@ -137,5 +137,5 @@ export class CreateAdRequest {
|
||||
@AutoMap()
|
||||
updatedAt: string;
|
||||
|
||||
timezone: string;
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,16 @@ export class TimeConverter {
|
||||
static toUtcDatetime = (
|
||||
date: string,
|
||||
time: string,
|
||||
ianaTimezone: string,
|
||||
): Date =>
|
||||
date && time
|
||||
? new Date(
|
||||
new DateTime(`${date}T${time}:00`, TimeZone.zone(ianaTimezone, false))
|
||||
.convert(TimeZone.zone('UTC'))
|
||||
.toIsoString(),
|
||||
)
|
||||
: undefined;
|
||||
timezone: string,
|
||||
): Date => {
|
||||
try {
|
||||
return new Date(
|
||||
new DateTime(`${date}T${time}:00`, TimeZone.zone(timezone, false))
|
||||
.convert(TimeZone.zone('UTC'))
|
||||
.toIsoString(),
|
||||
);
|
||||
} catch (e) {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user