using ByteBank.Modelos; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Humanizer;
namespace ByteBank.SistemaAgencia { class Program { static void Main(string[] args) { ContaCorrente c = new ContaCorrente(11, 4566);
DateTime data = new DateTime(2022, 03, 03, 16, 29, 59);
DateTime dataHoje = DateTime.Now; //Data e horário atual
Console.WriteLine(dataHoje);
Console.WriteLine(data);
TimeSpan diferencaDatas = data - dataHoje; //TimeSpan - Intervalo de tempo // Pra especificar utilizar a dll humanizer
string mensagem = $"Vencimento em {IntervaloDeTempo(diferencaDatas)}";
Console.WriteLine(mensagem);
TimeSpan diferenca = TimeSpan.FromMinutes(50);
string mensage = $"Vencimento em {TimeSpanHumanizeExtensions.Humanize(diferenca)}";
Console.WriteLine(mensage);
Console.ReadLine();
}
static string IntervaloDeTempo(TimeSpan tS)
{
Console.WriteLine(tS.Days);
return tS.Days + " dias";
}
}
}