/// <Summary>Gets the highest deaths with date.</Summary> /// <returns>A formatted string with the highest deaths test and date</returns> public string GetHighestDeathsWithDate() { var highestDeathsRecord = this.covidStatistics.FindRecordWithHighestDeaths(); var highestDeaths = Format.FormatIntegerAsFormattedString(highestDeathsRecord.Deaths); var date = highestDeathsRecord.Date.ToString(Assets.DateStringFormatted); return(CovidDataLines.GetCovidLineForValueAndDate(Assets.HighestDeathsLabel, highestDeaths, date)); }
/// <Summary>Gets the highest positive with date.</Summary> /// <returns>A formatted string with the highest positive test and date</returns> public string GetHighestPositiveWithDate() { var highestPositiveRecord = this.covidStatistics.FindRecordWithHighestPositiveCases(); var highestPositive = Format.FormatIntegerAsFormattedString(highestPositiveRecord.PositiveTests); var date = highestPositiveRecord.Date.ToString(Assets.DateStringFormatted); return(CovidDataLines.GetCovidLineForValueAndDate(Assets.HighestPositiveTestsLabel, highestPositive, date)); }
/// <summary>Gets the highest current hospitalizations with date.</summary> /// <returns>A formatted string with the highest current hospitalizations</returns> public string GetHighestCurrentHospitalizationsWithDate() { var highestCurrentHospitalizationsRecord = this.covidStatistics.FindRecordWithHighestCurrentHospitalizations(); var highestCurrentHospitalizations = Format.FormatIntegerAsFormattedString(highestCurrentHospitalizationsRecord.HospitalizedCurrently); var date = highestCurrentHospitalizationsRecord.Date.ToString(Assets.DateStringFormatted); return(CovidDataLines.GetCovidLineForValueAndDate(Assets.HighestCurrentHospitalizationsLabel, highestCurrentHospitalizations, date)); }
/// <Summary>Gets the highest percentage of positive tests with date.</Summary> /// <returns>A formatted string with the highest percentage of positive test and date</returns> public string GetHighestPercentageOfTestsPerDayWithDate() { string highestPercentage; var date = string.Empty; try { var highestPercentageRecord = this.covidStatistics.FindRecordWithHighestPercentageOfPositiveTests(); var positivePercentage = CovidDataStatistics.FindPositivePercentageForRecord(highestPercentageRecord); highestPercentage = Format.FormatNumericValueAsPercentage(positivePercentage); date = highestPercentageRecord.Date.ToString(Assets.DateStringFormatted); } catch (Exception) { highestPercentage = Assets.NoPositiveData; } return(CovidDataLines.GetCovidLineForValueAndDate(Assets.HighestPercentageOfPositiveCasesLabel, highestPercentage, date)); }