June 7, 201313 yr I wanted to learn everything about how to work with dates and time, in relation with php and sql (mysql). I thought a good place to start would be to create an online calendar application that would allow the user to place events in the represent date. and for others to be able to view that calendar through another page Anyone know any good material out there that could help me do this and learn all about using the dates and times functions correctly with php, all i seem to find is the calendar itself with no explanation of how to combine the calendar and any form data placed into the database. or i find a company with a pre built one.i want to build it from scratch any material you personally recommend would be appreciated i.e books, videos, articles, blog posts... anything really ill read it all P.s im not a beginner at php or mysql.. starting to get this ish down so throw anything my way.
June 7, 201313 yr http://php.about.com/od/finishedphp1/ss/php_calendar_4.htm that has the basics, you can use that to build from and build your application
June 7, 201313 yr Author Thanks i found that one myself, i meant something a little deeper than that But thanks for taking the time
June 9, 201313 yr Author Well that's nice but, i wanted to learn how to make it from scratch my self The calendar is just a project to learn fromYou don't know any resources, i.e books. That specialize or has a big section on php, mysql and date functions. I guess i can always look at the source code...
June 9, 201313 yr Yes, start with the php documentation and try out the apis, probably starting here. For my current project I actually need dates earlier than 1000AD, which is the earliest date mysql allows in its DATE type. Using an integer value, in the format of YYYYMMDD - for example 20130609 representing today - allows accurate date comparison, and I can go back as far as I want to year zero. For time values I store the time as seconds. I have two functions, secondsToTime and timeToSeconds, which are fairly simple to write. The last place I worked (a very large financial software company) followed this practice in general, so that's where I picked it up. If you want to support more sophisticated functionality, it may be better to leverage an existing api, for example if you need to support timezones, daylight savings (which differs by country) - this gets painful very quickly! However most of the time it's faster and simpler to store these two things as separate integers, and manage them on your own.
June 11, 201313 yr Author Personally i found, reading a book, doing tuts and reading the source code is the best way for me.. i got to do all three
June 25, 201313 yr Author Php|architect's Guide to Date and Time Programminghttp://www.amazon.co.uk/dp/0981034500 Finally found what i was looking for Thanks for the links
Create an account or sign in to comment