Version 1.1.44

Date 2022-12-12 (704 days ago)
Downloads 1,398 downloads
NuGet View on NuGet
GitHub View on GitHub
Target Frameworks .NET Standard 1.1 .NET Standard 1.3 .NET Standard 2.0 .NET 4.5 .NET 4.6 .NET 4.7 .NET 4.8 .NET 5 .NET 6

#installation">Installation

Install via NuGet - either via the .NET CLI:

dotnet add package Skybrud.Essentials --version 1.1.44

or the NuGet package manager:

Install-Package Skybrud.Essentials -Version 1.1.44

#changelog">Changelog

JSON

  • Internal JsonTokenUtils.String method should use invariant culture (see 2e6c476)
    The method is used internally in the package for converting a JToken to a string representation, and as such it's important that the method uses an invariant culture instead of the current culture.

  • Added Get{ValueType}OrNull and Get{ValueType}OrNullByPath extension methods to the NewtonsoftJsonObjectExtensions class (see 743ba7a)
    The new method allows getting nullable value types as an alternative to the default non-nullable value types already in the package.

EssentialsYear

  • Added explicit Start and End properties for the EssentialsYear class (see cc4bdca)
    The EssentialsYear class inherits the Start and End properties from EssentialsPeriod, but as EssentialsPeriod on it's own allows the to properties to be null. As a result, the new Start and End are not nullable as we know them to never be null for an EssentialsYear instance.

  • Added GetStartOfYear and GetEndOfYear methods to the EssentialsYear class (see 2520688)
    The two methods getting either the the start or end of the year, according to a specific time zone.

  • Added static Min and Max methods to the EssentialsYear class (see 6e08cbb)
    The methods allow finding either the minimum or maximum value of two EssentialsYear instances. Method overloads also support specifying multiple EssentialsYear instances.

  • Added GetStartOfYear and GetEndOfYear method overloads to the EssentialsYear class (see 8783f57)
    The two method overloads don't have any paramters, and the returned values will be based on the local time zone.

EssentialsMonth

  • Added explicit Start and End properties for the EssentialsMonth class (see 02df0a3)
    The EssentialsMonth class inherits the Start and End properties from EssentialsPeriod, but as EssentialsPeriod on it's own allows the to properties to be null. As a result, the new Start and End are not nullable as we know them to never be null for an EssentialsMonth instance.

  • Added static Min and Max methods to the EssentialsMonth class (see 355aa85)
    The methods allow finding either the minimum or maximum value of two EssentialsMonth instances. Method overloads also support specifying multiple EssentialsMonth instances.

  • Added GetStartOfMonth, GetStartOfYear, GetEndOfMonth and GetEndOfYear methods to the EssentialsMonth class (see fafd25a)
    The methods allows finding the start and end of either the month or the year - and based on either the local time zone or a specific time zone. The methods will take daylight savings into account if used by the time zone.

EssentialsWeek

  • Implemented ToString method in the EssentialsWeek class (see 5459a90)
    The ToString now returns an ISO 8601 string representation of the week.

  • Added GetYear method to the EssentialsWeek class (see 2df2c99)
    The method returns an EssentialsYear instance representing the year of the week.

  • Added Parse and TryParse methods to the EssentialsWeek class (see ec9c8fd)
    The methods allow parsing a ISO 8601 week string representation into an instance of EssentialsWeek.

  • Added static Min and Max methods to the EssentialsWeek class (see f256ee3)
    The methods allow finding either the minimum or maximum value of two EssentialsWeek instances. Method overloads also support specifying multiple EssentialsWeek instances.

  • Added GetStartOfWeek and GetEndOfWeek methods to the EssentialsWeek class (see 1cc68c1)
    The two methods allows getting the EssentialsTime for either the start of the week or end of the week respectively.

EssentialsDate

  • Added static Min and Max methods to the EssentialsDate class (see 13db5d2)
    The methods allow finding either the minimum or maximum value of two EssentialsDate instances. Method overloads also support specifying multiple EssentialsDate instances.

  • Added static Min and Max methods to the EssentialsTime class (see e5b0fb9)
    The methods allow finding either the minimum or maximum value of two EssentialsTime instances. Method overloads also support specifying multiple EssentialsTime instances.

EssentialsPeriod

  • Added EssentialsPeriod constructor overload (see afded4a)
    The overload takes a TimeZoneInfo instance as the third parameter to determine the time zone to be used for the Start and End properties.

EssentialsWeekRange

  • Added ToString, Parse and TryParse methods to the EssentialsWeekRange class (see #34 and 9fc08fb)
    This adds logic for converting a EssentialsWeekRange to a string and parsing from a string back to a EssentialsWeekRange instance.

EssentialsDateRange

  • Added ToString, Parse and TryParse methods to the EssentialsDateRange class (#32 and see 7e7d0ed)
    This adds logic for converting a EssentialsDateRange to a string and parsing from a string back to a EssentialsDateRange instance.