Giter Club home page Giter Club logo

nchronic.core's Introduction

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's People

Contributors

robertwilczynski avatar robbell avatar yakumo avatar mmozuras avatar bytecode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.