Code Monkey home page Code Monkey logo

stringtotime's People

Contributors

collegeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stringtotime's Issues

interpretation of am/pm flag for hour twelve (12) is reversed

Hey, I just noticed this issue while testing edge cases:

strtotime('2014-05-14 0:23') -> 2014-05-14 00:23:00.000
strtotime('2014-05-14 0:23p') -> 2014-05-14 12:23:00.000
strtotime('2014-05-14 1:23') -> 2014-05-14 01:23:00.000
strtotime('2014-05-14 1:23p') -> 2014-05-14 13:23:00.000
strtotime('2014-05-14 12:34') -> 2014-05-14 12:34:00.000
strtotime('2014-05-14 12:34a') -> 2014-05-14 12:34:00.000 <-- !!!
strtotime('2014-05-14 12:34am') -> 2014-05-14 12:34:00.000 <-- !!!
strtotime('2014-05-14 12:34p') -> 2014-05-15 00:34:00.000 <-- !!!
strtotime('2014-05-14 12:34pm') -> 2014-05-15 00:34:00.000 <-- !!!

I might have time to fix it myself a bit later, but thought it good to document it right away (so others can know if I do forget or get swamped).

Year calculation issue

  • While calculating date year value is not changing
    • Check below example
    • Issue 2017-07-31 + 005 month + 001 week = 2017-01-08
    • Supposed to be 2018-01-08

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.