Added Getter Stage/Contest/Split + Bug Fix PursuitManager Extract Passed Started Pursuit.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxDatesUtilities.h"
|
||||
|
||||
#include "DTFluxUtilitiesModule.h"
|
||||
@ -16,18 +15,20 @@ DTFluxDatesUtilities::~DTFluxDatesUtilities()
|
||||
|
||||
bool DTFluxDatesUtilities::CompileDateAndTime(const FString& Time, const FString& Date, FDateTime& OutDateTime)
|
||||
{
|
||||
if(Time.Len() < 8 && Date.Len() < 10)
|
||||
if (Time.Len() < 8 && Date.Len() < 10)
|
||||
{
|
||||
TArray<FString> ExplodedTime;
|
||||
Time.ParseIntoArray(ExplodedTime, TEXT(":"));
|
||||
if(ExplodedTime.Num() != 3 && !ExplodedTime[0].IsNumeric() && !ExplodedTime[1].IsNumeric() & !ExplodedTime[2].IsNumeric())
|
||||
if (ExplodedTime.Num() != 3 && !ExplodedTime[0].IsNumeric() && !ExplodedTime[1].IsNumeric() & !ExplodedTime[2].
|
||||
IsNumeric())
|
||||
{
|
||||
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Time Format [%s]. Unable to parse"), *Time);
|
||||
return false;
|
||||
}
|
||||
TArray<FString> ExplodedDate;
|
||||
Date.ParseIntoArray(ExplodedDate, TEXT("-"));
|
||||
if(ExplodedDate.Num() != 3 && !ExplodedDate[0].IsNumeric() && !ExplodedDate[1].IsNumeric() && !ExplodedDate[2].IsNumeric() )
|
||||
if (ExplodedDate.Num() != 3 && !ExplodedDate[0].IsNumeric() && !ExplodedDate[1].IsNumeric() && !ExplodedDate[2].
|
||||
IsNumeric())
|
||||
{
|
||||
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Date Format [%s]. Unable to parse"), *Date);
|
||||
return false;
|
||||
@ -38,7 +39,7 @@ bool DTFluxDatesUtilities::CompileDateAndTime(const FString& Time, const FString
|
||||
int32 Day = FCString::Atoi(*ExplodedDate[2]);
|
||||
int32 Month = FCString::Atoi(*ExplodedDate[1]);
|
||||
int32 Year = FCString::Atoi(*ExplodedDate[0]);
|
||||
if(FDateTime::Validate(Year, Month, Day, Hours, Minutes, Seconds, 0))
|
||||
if (FDateTime::Validate(Year, Month, Day, Hours, Minutes, Seconds, 0))
|
||||
{
|
||||
OutDateTime = FDateTime(Year, Month, Day, Hours, Minutes, Seconds);
|
||||
return true;
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
class DTFLUXUTILITIES_API DTFluxDatesUtilities
|
||||
{
|
||||
public:
|
||||
DTFluxDatesUtilities();
|
||||
~DTFluxDatesUtilities();
|
||||
|
||||
|
||||
static bool CompileDateAndTime(const FString& Time, const FString& Date, FDateTime& OutDateTime);
|
||||
static bool CompileDateAndTime(const FDateTime& Time, const FDateTime& Date, FDateTime& OutDateTime);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user