3 minutes reading time (525 words)

GSoC 2014: Managing Date and Time

GSoC 2014: Managing Date and Time

Managing date and time is not simple and many of us developers don't like to do it. Unfortunately, we need this in almost any application. To be honest, I can't imagine an application that does not use date or time at some point. My goal is to make it more simple and more intuitive. The result would be writing less code by developers. What am I going to do? I'm going to create a brand new Date class.

Hi, my name is

My name is Tomasz Hanc and I'm from Poland. I'm a third year Computer Science student at Polish-Japanese Institute of Information Technology. I like to read books that will make me a better person and better developer.

My journey with IT started from Pascal language. It was really exciting when I could give a command to my computer and get the result (for example calculating some simple math equations). Later I did some projects (homework at university) in C++, C#, Java and PHP. In the begining I thought about PHP as just a language to start my career as a programmer, because it is simple, light and easy to use. It's easy to do a summer internship in PHP and then put something useful in your CV. But I was wrong. PHP is not a Cinderella in the environment of programming languages, it's really a beast!

Recently, in addition to PHP, I've also been exploring C# and .NET technology.

GSoC 2014

I'm really grateful for the opportunity to participate in Joomla's GSOC 2014 program. I would like to thank the Joomla organization and especially Herman Peeren and Søren Beck Jensen who will be my mentors during the summer. I'm really excited because it's my first open source project.

As I said I'm going to create a new DateTime class. You can ask me why and that's an excellent question! First of all the current Date class in Joomla is extending the PHP DateTime class. This is kind of a bad solution beacuse it makes Joomla's Date class mutable*. So the first thing, I will make our new Date class to be immutable. If you don't know why this is important, please stay tuned to my next article about Value Objects - I will explain everything.

Tell me what you need

Let's leave the technical stuff for later and let's focus on the most important issue. I really want to finish this project with great success and to achieve this I need your help. So please help me to make this happen! Let's see what we already have for our class:

  • date calculations (addition and substraction)
  • properties for date ingredients
  • getting the begining and the end of a day/week/month/year
  • a „timeSince” method → getting nice 'string' interval: 2 minutes ago, 7 weaks ago, etc.
  • getting date from string

I would like you to tell me what you need in order to get a more useful DateTime class. Would you please leave a comment below or join a discussion on Framework Mailing List? Thank you very much!

* I know that PHP 5.5 have a DateTimeImmutable class, but the minimum requirements for Joomla are lower.

Série : Astuces SEO pour migration - Partie 1 - Pl...


Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/