Giter Site home page Giter Site logo

dateparser's Introduction

fabiang/dateparser

Date parsing library supporting the full format RFC3339. The following formats are supported:

2017-07-25T18:37:40
2017-07-25T18:37:40.1234567890
2017-07-25T18:37:40.1234567890Z
2017-07-25T18:37:40Z
2017-07-25T18:37:40.1234567890+0200
2017-07-25T18:37:40+0200
2017-07-25T18:37:40.1234567890-0400
2017-07-25T18:37:40-0400
2017-07-25T18:37:40.1234567890+02:00
2017-07-25T18:37:40+02:00
2017-07-25T18:37:40.1234567890-04:00

Note: PHP only supports 6 digit microseconds. This library cut the last digits off.

PHP Version Require Latest Stable Version License
Continuous Integration

Installation

Run Composer with:

composer require fabiang/dateparser

Usage

Parsing an RFC3339 datetime string:

use Fabiang\Dateparser\RFC3339;

$parser = new RFC3339();
$datetime = $parser->parse('2017-07-25T18:37:40+02:00'); // DateTime object

Licence

BSD-2-Clause. See the LICENSE.md.

dateparser's People

Contributors

fabiang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.