CakePHP Time formatting: year of "week of year"

While jumping between PHP and JavaScript - one of the most annoying things is dates handling. Recently, one of the clients reported that, while using our app for appointments and work schedule - they lost one of the working days. Client’s worker was supposed to work on the 31st of December 2019. Firstly, working on the 31st is an achievement. Since we can’t affect it, “bug report” was filled on our end....

December 7, 2018 · 1 min · anvyst

How many seconds a day have?

Pretty neat example of how you shouldn’t calculate days/weeks from Swizec Teller. If you think that day is equal 60 * 60 *24 seconds - this post’s for you. Thanks to the wonder that is daylight savings time (DST), we have a day that’s only 23 hours long. We also have a day that’s 25 hours long. Then, every few years, we have a day that’s 86,401 seconds long. In theory, we could even have a day that’s 86,399 seconds long....

November 23, 2015 · 1 min · anvyst