Chronic.Core 0.4.0

A natural language date parser for .Net Standard. A port of Ruby's Chronic.

Install-Package Chronic.Core -Version 0.4.0
dotnet add package Chronic.Core --version 0.4.0
<PackageReference Include="Chronic.Core" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chronic.Core --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Chronic.Core, 0.4.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chronic.Core as a Cake Addin
#addin nuget:?package=Chronic.Core&version=0.4.0

// Install Chronic.Core as a Cake Tool
#tool nuget:?package=Chronic.Core&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

nChronic.Core

Introduction

A natural language date parser for .Net Standard written in C#. Originally written by Mike Schrag as a direct port of Ruby's Chronic, later ported to .NET by Robert Wilczynski, and finally migrated to .NET Standard by Rob Bell.

Usage

DateTime.Now; 
  //=> Sun Aug 27 23:18:25 PDT 2006

var parser = new Parser();
parser.Parse("tomorrow");
  // => Mon Aug 28 12:00:00 PDT 2006

// Setting context
parser = new Parser(new Options { Context = Pointer.Type.Past });
parser.Parse("monday");
  // => Mon Aug 21 12:00:00 PDT 2006

parser = new Parser(new Options { Clock = () => new DateTime(2000, 1, 1)});
parser.Parse("may 27th");
  // => Sat May 27 12:00:00 PDT 2000

Installation

.NET Core

dotnet add package Chronic.Core

.NET Framework

Install-Package Chronic.Core

Credits

This is a port of https://github.com/mojombo/chronic inspired by https://github.com/samtingleff/jchronic. Please see those projects for further credits.

License

Unless specified otherwise all is licensed under the MIT license. See LICENSE for details.
Logo is the creation of Alexander Moore and is licensed under the GNU/GPL license (via http://findicons.com/icon/232550/clock).

nChronic.Core

Introduction

A natural language date parser for .Net Standard written in C#. Originally written by Mike Schrag as a direct port of Ruby's Chronic, later ported to .NET by Robert Wilczynski, and finally migrated to .NET Standard by Rob Bell.

Usage

DateTime.Now; 
  //=> Sun Aug 27 23:18:25 PDT 2006

var parser = new Parser();
parser.Parse("tomorrow");
  // => Mon Aug 28 12:00:00 PDT 2006

// Setting context
parser = new Parser(new Options { Context = Pointer.Type.Past });
parser.Parse("monday");
  // => Mon Aug 21 12:00:00 PDT 2006

parser = new Parser(new Options { Clock = () => new DateTime(2000, 1, 1)});
parser.Parse("may 27th");
  // => Sat May 27 12:00:00 PDT 2000

Installation

.NET Core

dotnet add package Chronic.Core

.NET Framework

Install-Package Chronic.Core

Credits

This is a port of https://github.com/mojombo/chronic inspired by https://github.com/samtingleff/jchronic. Please see those projects for further credits.

License

Unless specified otherwise all is licensed under the MIT license. See LICENSE for details.
Logo is the creation of Alexander Moore and is licensed under the GNU/GPL license (via http://findicons.com/icon/232550/clock).

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.4.0 562 12/24/2020
0.3.2 3,680 4/17/2017