GithubHelp home page GithubHelp logo

Comments (5)

othercorey avatar othercorey commented on June 1, 2024

What version of Chronos are you using?

Do you set a locale?

from chronos.

tokyo-walker avatar tokyo-walker commented on June 1, 2024

I use version 1.2.3.
I don't set a locale.

from chronos.

markstory avatar markstory commented on June 1, 2024

I'm not able to reproduce the results you're having in a test application I have locally.

ᐉ bin/cake console
You can exit with `CTRL-C` or `exit`

Psy Shell v0.10.6 (PHP 7.4.9 — cli) by Justin Hileman
>>> \Cake\Core\Configure::version()
=> "4.2.4"
>>> $d = new Cake\Chronos\Chronos('1968-01-01');
=> Cake\Chronos\Chronos @-63158400 {#2609
     hasFixedNow: false,
     time: "1968-01-01 00:00:00.000000",
     date: 1968-01-01 00:00:00.0 UTC (+00:00),
   }
>>> $d->year;
=> 1968

from chronos.

garas avatar garas commented on June 1, 2024

Is your snippet complete, is there some additional step? There is double closing parenthesis.

new Chronos('1969-01-01'))->year // 2069
                         ^

Behavior to add 100 years to year before 70 exists when parsing two digits year like '69-01-01'.

from chronos.

tokyo-walker avatar tokyo-walker commented on June 1, 2024

I'm sorry. It will be here correctly

$year = (new Chronos('1969-01-01'))->year // 2069

Behavior to add 100 years to year before 70 exists when parsing two digits year like '69-01-01'.

Okay, I understand. I'll execute by four digits.

from chronos.

Related Issues (20)

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.