Created
March 1, 2025 08:02
-
-
Save renatogroffe/ad478f01187bda31931eb667007b6f99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using System.Runtime.InteropServices; | |
Console.WriteLine("***** Testes com .NET 10 | Novos overloads na classe estatica ISOWeek *****"); | |
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation | |
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment | |
.OSVersion.VersionString}"); | |
var currentDate = DateOnly.FromDateTime(DateTime.Now); | |
Console.WriteLine(); | |
Console.WriteLine($"Data atual: {currentDate}"); | |
Console.WriteLine($"Semana do ano: {ISOWeek.GetWeekOfYear(currentDate)}"); | |
Console.WriteLine($"Ano: {ISOWeek.GetYear(currentDate)}"); | |
var firstFriday2025 = ISOWeek.ToDateOnly(2025, 1, DayOfWeek.Friday); | |
Console.WriteLine($"Primeira sexta-feira de 2025: {firstFriday2025}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment