News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ben Ramsey:
Dates Are Hard
February 24, 2014 @ 09:03:24

In a new post to his site Ben Ramsey talks about why dates are hard and can be frustrating to work with sometimes. It revolves around an issue he recently found with calculating a time for a UUID and days of the week.

No, I'm not talking about a meeting with a lover or potential lover. While those can be stressful, the calendar math used to determine the precise date and time on which such a meeting might occur is infinitely more difficult to perform. To software programmers, this isn't news, but I recently encountered an issue when calculating the time for an RFC 4122 UUID that had me questioning the accuracy of our modern, accepted calendars, especially with regard to the days of the week on which our dates fall.

In his work on his UUID library, he came across a the bug because of some failing unit tests. It was only happening in certain versions of PHP and upon further investigation found the issue to be a wrong day of the week from a date in 1582 (the correct value being Sunday). As it turned out, the date in question was actually a Saturday and his local environment was reporting bad results. The problem was with a revision made to the Gregorian calendar, removing 10 days causing a difference between the Gregorian and Great Britain versions of 1582.

0 comments voice your opinion now!
date time calendar gregorian unittest greatbriain year

Link: http://benramsey.com/blog/2014/02/dates-are-hard/

Derick Rethans:
ISO 8601 week dates
September 24, 2013 @ 09:54:31

Derick Rethans has a new post with details about handling ISO 8601 dates in PHP via the DateTime functionality. It's a response to some bugs filed having to do with week numbering.

Week numbers are defined in this same ISO 8601 standard. Each year has 52 or 53 weeks and weeks always start on a Monday. Week number 1 of each year is the first week in a year that has the first Thursday of the year, or in other words, the week containing January 4th.

He talks about some of the date format arguments that use would use when working with the ISO 8601 formatting and how it relates to the calendar year. He points out that the "Y" format specifier is not the same as the "o" - the first being the calendar year while the second relates to the ISO 8601 year.

As conclusion, this article shows that there are two ways representing dates in PHP. In the Gregorian1 calendar with year, month and day (of month), and in the ISO 8601 calendar with year, week and day (of week). The format characters for the two different years are either Y or o and they should not be confused.
0 comments voice your opinion now!
iso8601 date datetime format specifier gregorian calendar difference

Link: http://derickrethans.nl/iso-8601-weeks.html

Community News:
Web Advent 2012
December 03, 2012 @ 08:19:44

From the folks that have brought you the PHP Advent series of posts in the past (Chris Shiflett, Sean Coates and all of their great contributing authors) comes this year's more general selection of articles - webadvent.org.

Christmas is upon us once again, and it's time to have a look at what's under the Web Advent tree. Join us each day as our wonderful authors provide presents of tips, tricks, & tidbits to usher in the new year.

This years posts are (list will be updated as more are added)

You can find articles from previous years in the site's sidebar.

0 comments voice your opinion now!
webadvent12 advent calendar article


Community News:
PHP Advent 2011 is Complete!
December 26, 2011 @ 16:20:56

This year's PHP Advent calendar has finished up and if you haven't gotten a chance to check out some of the great content in this year's edition, be sure to take a look at the full list. It incudes topics like:

  • Front-end testing with SimpleTest
  • Scalable applications
  • Cross-origin ajax
  • working with Chef
  • Error handling
  • Dates and Times

The articles are by several well-knowns both in the PHP community and outside. While you're there, be sure to check out some of the previous years too!

0 comments voice your opinion now!
complete phpadvent advent calendar tutorial article


Community News:
PHP Advent 2011
December 02, 2011 @ 11:02:10

It's that time of year again and this year's PHP Advent has kicked off with the first article posted yesterday. Below is a list of the articles for this year's advent calendar, to be updated as each new one is released:

Check back for the growing list as this year's advent gets more great content every day!

0 comments voice your opinion now!
phpadvent advent calendar community article


Derek Allard's Blog:
Modifying the default CodeIgniter Calendar template for fun and profit
December 24, 2010 @ 11:09:33

Derek Allard has a quick post for the CodeIgniter users out there with some styling you can use on the default CI calendar.

A project I'm working on needs a monthly calendar. Naturally, I'm using CodeIgniter as the base of it. [...] My needs were something more akin to the interface iCal provides; broad, spacious, subtle. Obviously, the default is just an unstyled base that CI provides as a starting grounds. The Calendar library documentation provides some insight into how we can start changing this up.

He talks about the settings he needed to change including the "day_type" setting and template that specifies the CSS classes to use. Add in the CSS and you'll end up with something like this. You can download the example files too.

0 comments voice your opinion now!
default codeigniter framework template css style calendar


Yahoo Developer Network:
'Tis the season for developers' calendars
December 06, 2010 @ 15:36:16

On the Yahoo Developer Network a new post talks about some of the developer "advent" calendars that have popped up around the web - including the PHP Advent.

Christmas is upon us. Developers are embracing the spirit of sharing their knowledge and wisdom, while taking the opportunity to look back and recollect what 2010 brought us in terms of new technologies and ideas. A number of "advent" calendars started posting their blog-a-day-till-Dec-24th. Here are some for your reading pleasure while you kick back with a glass of wine by the fireplace.

Also on the list are: the 24 Ways (general web dev), the Perl Advent, Web Performance Calendar and the HTML5 Advent. Be sure to check out the comments for more calendars!

0 comments voice your opinion now!
developer calendar advent perl performance html5


Chris Shiflett's Blog:
PHP Advent
December 01, 2010 @ 10:11:18

Good news for all of the fans of the PHP Advent article series that comes around this time each year - Chris Shiflett has confirmed it'll be happening again this year.

PHP Advent is our little way of showcasing some of the talented people who work with PHP in some form or fashion, and persuading them to share something they've learned during a busy month when they might otherwise keep quiet. We'll be publishing an article each day in December until Christmas.

If you're new to the PHP Advent (or advent-type article calendar things), check out last year's articles from lots of great members of the PHP community covering everything from development processes, technology tips and parenting.

0 comments voice your opinion now!
phpadvent article advent calendar chrisshiflett seancoates


Zend Developer Zone:
Web2project Then and Now
October 11, 2010 @ 10:15:12

On the Zend Developer Zone, there's a post from Keith Casey about an open source project he's worked on for the past three years has made it to get where it is. This also includes some of the challenges they faced and how they've made sure the code's gotten better over time.

When most people think of Open Source PHP projects, some immediately spring to mind. If you're a developer or a blogger, there are obvious choices, but what about options for small to medium businesses? What Open Source projects are out there to help with day to day operations and track how projects are going?

The project, web2project, started as a fork of another project but has taken on a life of its own. They looked at what the users wanted and added iCal feeds and the idea of "hooks" developers could use to attach their own components into the project's structure. They also added loads of unit tests to ensure that things were kept stable as well as some more advanced time handling via the DateTime object PHP has to offer. If you'd like to see the current state of the project, you can find it over on SourceForge.

0 comments voice your opinion now!
web2project opensource project calendar unittest


Okaka Design Blog:
Event calendar using Codeigniter and jQuery without BackendPro
February 17, 2010 @ 12:58:27

In a previous article posted to the Okada Design Blog, they showed you how to create a calendar using jQuery, CodeIgniter and the BackendPro toolset. They're back with a new article today showing how you can do the same thing without BackendPro.

I have some requests for a Event Calendar without BackendPro. Since it is not using BeP, I only used CRUD without individual calendar. So there won't be any mycal function. I took out all of the Bep thingy and made it simpler (I hope).

If you want the full tutorial on how the CodeIgniter part is set up, check out their previous article. If you're just looking for the new sans-BackendPro code, you can download it here.

0 comments voice your opinion now!
tutorial backendpro jquery calendar



Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant series zendserver deployment list release code threedevsandamaybe podcast bugfix symfony community interview language framework laravel conference tips api introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework