EstecheAssemblies 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package EstecheAssemblies --version 1.0.2
NuGet\Install-Package EstecheAssemblies -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EstecheAssemblies" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EstecheAssemblies --version 1.0.2
#r "nuget: EstecheAssemblies, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EstecheAssemblies as a Cake Addin
#addin nuget:?package=EstecheAssemblies&version=1.0.2

// Install EstecheAssemblies as a Cake Tool
#tool nuget:?package=EstecheAssemblies&version=1.0.2

Introduction

Good functionalities for developers.


Content

DateTime Extensions

  • ToFriendlyTimeSpan(Language)

Returns a friendly text on the TimeSpan got it for this DateTime until Now. E.g. "00:00:04" = "4 minutes ago" or “00:05:32” = “5 hours ago” It is available in English, Chinese, Spanish and Swedish.

  • ToShortFriendlyTimeSpan(Language)

Returns a shorter friendly text on the TimeSpan got it for this DateTime until Now. E.g. "00:00:04" = "4 min" or “00:05:32” = “5 hr” It is available in English, Spanish and Swedish. The Chinese has no shorter version.

String Extensions

  • IsAbsNumeric()

Returns a bool telling if a String is an absolut entire number

  • IsDateTime()

Returns a bool telling if a String is a DateTime and returns the value parsed in case it is correct.

  • IsGuid()

Returns a bool telling if a String is a DateTime and returns the value parsed in case it is correct.

  • IsSwedishPersonalNumber()

This is a functionality used in Sweden for validating a personal number (Social Security number) Returns a bool telling if a String is a correct Swedish Personal Number and in case of Not, it returns the Error Message.


Good to know

This package is free for everyone to use. It is open source wroten in C# allocated in AzureRepo: https://dev.azure.com/fuestechefamily/EstecheAssemblies/_git/EstecheAssemblies


Implementation

Add using

using EstecheAssemblies;

ToFriendlyTimeSpan(Language)

var date = new DateTime("2019-08-08 01:03:21");
var friendlyTextEnglish = date.ToFriendlyTimeSpan(Language.English);
var friendlyTextSimplifiedChinese = date.ToFriendlyTimeSpan(Language.SimplifiedChinese);
var friendlyTextTraditionalChinese = date.ToFriendlyTimeSpan(Language.TraditionalChinese);
var friendlyTextSwedish = date.ToFriendlyTimeSpan(Language.Swedish);
var friendlyTextSpanish = date.ToFriendlyTimeSpan(Language.Spanish);
var friendlyTextEnglishDefault = date.ToFriendlyTimeSpan();

ToShortFriendlyTimeSpan(Language)

var date = new DateTime("2019-08-08");
var shorterFriendlyTextEnglish = date.ToShortFriendlyTimeSpan(Language.English);
var shorterFriendlyTextSimplifiedChinese = date.ToShortFriendlyTimeSpan(Language.SimplifiedChinese);
var shorterFriendlyTextTraditionalChinese = date.ToShortFriendlyTimeSpan(Language.TraditionalChinese);
var shorterFriendlyTextSwedish = date.ToShortFriendlyTimeSpan(Language.Swedish);
var shorterFriendlyTextSpanish = date.ToShortFriendlyTimeSpan(Language.Spanish);
var shorterFriendlyTextEnglishDefault = date.ToShortFriendlyTimeSpan();

IsDateTime()

var text = "2019-08-08-68";
var validDate = text.IsDateTime();

IsGuid()

var text = "6B1A5C52-E10C-471C-422309EC06A1";
var validGuid = text.IsGuid();

IsAbsNumeric()

var text = "6B1A5C52";
var validNumber = text.IsAbsNumeric();

IsAbsNumeric()

var text = "121212-1212";
var validNumber = text.IsSwedishPersonalNumber();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EstecheAssemblies:

Package Downloads
BlazorMarkdown2Html

Display markdown files in html format directly in a Blazor with a component. The only think a developer need to do it is to add the path to the file e.g. "ReadMe.md" into the parameter "documentName" and the rest it is handled by the component. If you give the default css it even handle dark and light mode heritated from the webbrowser.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 3,890 4/9/2021
1.0.7 1,535 10/28/2020
1.0.6 1,418 3/26/2020
1.0.5 809 10/7/2019
1.0.4 528 10/1/2019
1.0.3 485 9/30/2019
1.0.2 507 9/27/2019
1.0.1 491 9/26/2019
1.0.0 503 9/25/2019