Calendar library supporting holidays - php

Are there any existing library that support holidays (e.g. Christmas) highlight in the calendar itself?
Google Calendar is fine, but I just want to use the library to display the calendar, I don't actually needed to create the events.
Any idea?

Problem with you saying holidays is that you are assuming a certain country / geographical / religious affiliation.
What you should really be looking for is a way to mark certain dates with something, as ultimately that is what you need. Holidays mean nothing other than days marked off or showing different from another. Google does this by utilizing feeds (which you could use).
Mozilla keeps a list of holidays as well:
http://www.mozilla.org/projects/calendar/holidays.html
You will have to apply the list to your chosen calendar (most support day / date changes, and you would loop through your holiday list and add those days / mark as special).
Here is an example of jQuery Datepicker with Bank Holidays:
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendarBankHolidays.html
Hope that gets you started.

Rather late in posting an answer, but as the current maintainer of the relevant PEAR Packages, I would suggest that you utilise the Date Holidays suite of components from PEAR. There are drivers for most countries: Australia, USA, UK, Germany, Russia and others.

Related

Google Search Console Latest Date

I am using Google Search Console for php to obtain search analytics of my website. I know Google provides data for 90 days, but the end date to that range is not the current date, but usually a couple days prior. Is there a simple way to find the true end date for the data provided? I know I could send requests for recent days and work backwards until a result is returned, but I feel there must be a better way.
The Search Console provides the Search Data 3 days later. So today (20.06.) you see the data from 17.06. You just have to check at what time the data apears. This is form SC to SC a little bit different.

iCalendar exclude date range

I am working on school timetables system and currently developing a PHP script that would allow exporting the data in iCalendar (.ics) format. The target use-case of exporting the data would be importing it into Google Calendar.
Since there are holidays inbetween the semesters in our school (specified by start and end date), what would be the best way to exclude the holidays from the iCalendar recurrence rule (RRULE)?. Keep in mind that there can be many different schedules in one export.
I did try using EXDATE;VALUE=DATE:YYYYMMDD,YYYYMMDD,YYYYMMDD... with all holiday days, but Google Calendar didn't exclude the dates, probably because schedules also have time attached and therefore they don't match.
I'll also provide the data in iCalendar format with one of the events, with holiday days excluded one by one (the one that didn't work)
BEGIN:VCALENDAR
PRODID:-//Gregor Eesmaa/NONSGML Poska timetables//ET
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
UID:schedule-1442#jpg.tartu.ee
SUMMARY:French
DESCRIPTION:
LOCATION:Room 210
DTSTART:20151215T123000Z
DTEND:20151215T134500Z
RRULE:FREQ=WEEKLY;UNTIL=20160211;INTERVAL=1;BYDAY=TU
EXDATE;VALUE=DATE:20151223,20151224,20151225,20151226,20151227,20151228,20151229,20151230,20151231,20160101,20160102,20160103,20160104,20160105,20160106,20160107,20160108,20160109,20160110,20160319,20160320,20160321,20160322,20160323,20160324,20160325,20160326,20160327,20160415,20160416,20160417,20160418,20160607,20160608,20160609,20160610,20160611,20160612,20160613,20160614,20160615,20160616,20160617,20160618,20160619,20160620,20160621,20160622,20160623,20160624,20160625,20160626,20160627,20160628,20160629,20160630,20160701,20160702,20160703,20160704,20160705,20160706,20160707,20160708,20160709,20160710,20160711,20160712,20160713,20160714,20160715,20160716,20160717,20160718,20160719,20160720,20160721,20160722,20160723,20160724,20160725,20160726,20160727,20160728,20160729,20160730,20160731,20160801,20160802,20160803,20160804,20160805,20160806,20160807,20160808,20160809,20160810,20160811,20160812,20160813,20160814,20160815,20160816,20160817,20160818,20160819,20160820,20160821,20160822,20160823,20160824,20160825,20160826,20160827,20160828,20160829,20160830,20160831
LAST-MODIFIED:20160102T123758Z
DTSTAMP:20160107T232137Z
END:VEVENT
END:VCALENDAR
If DTSTART is a date-time value then EXDATEs must also be date-times. I propose you append T123000Z to each of your EXDATEs to make them actually point to valid instance starts. They will then get correctly excluded.
Based on this other SO issue, it seems you're not setting any excluded date in EXDATE. EXDATE can be set to DATE, based on the RFC 5545 specificaiton.
Based on the answer on the other issue, your EXDATE should have been
EXDATE:20151223,20151224,20151225,20151226,20151227,20151228,20151229,20151230,20151231,20160101,20160102,20160103,20160104,20160105,20160106,20160107,20160108,20160109,20160110,20160319,20160320,20160321,20160322,20160323,20160324,20160325,20160326,20160327,20160415,20160416,20160417,20160418,20160607,20160608,20160609,20160610,20160611,20160612,20160613,20160614,20160615,20160616,20160617,20160618,20160619,20160620,20160621,20160622,20160623,20160624,20160625,20160626,20160627,20160628,20160629,20160630,20160701,20160702,20160703,20160704,20160705,20160706,20160707,20160708,20160709,20160710,20160711,20160712,20160713,20160714,20160715,20160716,20160717,20160718,20160719,20160720,20160721,20160722,20160723,20160724,20160725,20160726,20160727,20160728,20160729,20160730,20160731,20160801,20160802,20160803,20160804,20160805,20160806,20160807,20160808,20160809,20160810,20160811,20160812,20160813,20160814,20160815,20160816,20160817,20160818,20160819,20160820,20160821,20160822,20160823,20160824,20160825,20160826,20160827,20160828,20160829,20160830,20160831
Hope this helps!
I posted this question looking for a solution that would exclude whole ranges. After careful consideration, I decided to do this properly, by excluding only the date-times where the event would actually take place. This decreased the file size of the export three fold.
I also added timezone information as recommended for using RRULE. Now the French lesson event would look like this:
BEGIN:VEVENT
UID:schedule-1442#jpg.tartu.ee
SUMMARY:French
DESCRIPTION:
LOCATION:Room 210
DTSTART;TZID=Europe/Tallinn:20151215T143000
DTEND;TZID=Europe/Tallinn:20151215T154500
RRULE:FREQ=WEEKLY;UNTIL=20160211;INTERVAL=1;BYDAY=TU
EXDATE;TZID=Europe/Tallinn:20151229T143000,20160105T143000
CREATED:20160102T123758Z
LAST-MODIFIED:20160102T123758Z
DTSTAMP:20160108T115122Z
END:VEVENT

Name shown according to the user's computer date

I have a list of Czech names associated with days of the year - all Czech people have their birthday as well as a "name day". I'd like to display the appropriate name(s) associated with each day (there is a long list) according to the user's computer date. Before investigating coding this myself I wanted to ask if you may know a Javascript script for this type of application already, or know how I should go about it. This site is PHP.
You can see the list of Czech name days here: http://en.wikipedia.org/wiki/Name_days_in_the_Czech_Republic
Yes, there is one. The page is in german unfortunatly: http://www.web-toolbox.net/webtoolbox/datum/datum-tagestipp365.htm
You may use google translate to translate the description.

3D graph using Google Charts API

I am currently creating a graph using Google Chart API. I have a data-set which contains a months worth of data.
For example:
{
'1':{
'date':'01-01-2012',
'dow':'01', // Monday
'profit':'326', // GBP
}, '2':{
'date':'02-01-2012',
'dow':'02', // Tuesday
'profit':'142'
}
}
This is just a bit that I made up, but imagine this for 3 months worth of data, and I need to create a comparison graph of all Mondays (and Tuesdays, Wednesdays, etc), to show any profit patterns/anomalies which may have occured.
The problems I have is that
I don't think Google Charts API can invoke a Z-Axis which would be useful.
I can't figure out how I would group all Days of Week and dates successfully (in order).
So I guess why question would be, "How would I do this?".
Here is a screenshot of what I have got already:
Obviously, that's just the dates in order, I need to compare the days-of-week yet.
Any help would be great!
Thanks!

Getting the title of a google calendar event without zend framework

I am trying to find a way to get the title of several all day events that happen once a day only on weekdays in a calendar that I have from a separate URL. I have been working for a while to try and figure out how to just get the Title and the Date for each of the all day events (I think they are all day events.... the ones that appear in the top bar on the normal calendar display).
I tried accessing the xml file for the calendar but I did a control+F and found none of the titles That I know would pop up, so I am not able to parse the xml file (since what I am looking for doesn't exist). I also tried messing around with zend framework and got no luck after a few hours (even with the demos... I blame my web host).
point is, I have no idea what to do now. please help. (just a reminder, all I want to do is READ calendar events)
php is language of choice

Categories