Page 1 of 1

3 month 1 day spreadsheet where to start

Posted: Wed Mar 23, 2016 12:42 pm
by jonnyfortis
i am building a student register for classes that only happen once a week and are paid for quarterly.
i want to show across the top of the spreadsheet the date of the class for three months for example

march / april / may 2016

1/3/16 | 8/3/16 | 15/3/16 | 22/3/16 | 29/3/16 | 5/4/16 | 12/4/16 etc....
--------------------------------------------------------------------------------
then in this section here there will be a tickbox to show if student has turned up

i want this to continue every three months

i have know idea where to start
thanks

Re: 3 month 1 day spreadsheet where to start

Posted: Wed Mar 23, 2016 2:28 pm
by Christopher
The place to start is learning how to use the DateTime classes in PHP:

http://php.net/manual/en/book.datetime.php (there are also tutorials out there if you search for them)

And for your problem, learning how to get specific dates like the next Tuesday:

http://php.net/manual/en/datetime.formats.relative.php (likewise, examples out there if you search for them)

Once you learn the basics of using DateTime then DateInterval and DatePeriod will get you the rest of the way on your project.

PS - the DateTime classes may seem complex, the they are so much better than doing it all manually.

Re: 3 month 1 day spreadsheet where to start

Posted: Wed Mar 23, 2016 4:12 pm
by Celauran
Once you have a good understanding of DateTime, take a look at Carbon. It gives DateTime a friendlier API.