Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:50:22+00:00 2026-06-13T16:50:22+00:00

I am using the following code to parse XML data from a Google Calendar

  • 0

I am using the following code to parse XML data from a Google Calendar feed:

    require_once('coreylib/coreylib.php');

    $calendar = variable_get('calendar_id_setting');

    $now = date('Y/m/d', strtotime('now'));
    $next_week = date('Y/m/d', strtotime('+7 days'));
    $api = new clApi('http://www.google.com/calendar/feeds/' . $calendar .'/public/full?singleevents=true&min-start=' . $now . '&max-start=' .$next_week);

    if ($feed = $api->parse()) {

        foreach($feed->get('entry') as $entry) {

                  error_log($title . ' ' . strtotime($entry->get('when@startTime')));

The problem is in the error log my first result is a unique event with correct title and time, but the following 25 results all have the same title and have a start time in 2026(?!).

All but one of the events are recurring events. I thought setting ‘singleevents=true’ on the URL would solve this problem but apparently not! What is the correct fix here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:50:24+00:00Added an answer on June 13, 2026 at 4:50 pm

    Compare your URL with the one in the Calendar API v2 documentation. You’re providing parameters min-start and max-start, in a format of 'Y/m/d'. The documentation shows an example with parameters of

    start-min=2006-03-16T00:00:00&start-max=2006-03-24T23:59:59
    

    Note the use of start-min and start-max, and a format of yyyy-MM-dd'T'HH:mm:ss. Given the parameter reference I suspect you could get away with just yyyy-MM-dd, but you should follow that format rather than using slashes and single-digit versions.

    Of course that doesn’t quite explain the results you’re getting in 2026, but using the right parameters would be a good starting point.

    Additionally, you may wish to consider using the v3 API and possibly the PHP (beta) client library.

    (Note: although I work for Google and used to use the client API myself, this answer is provided purely in a personal capacity.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code to import my data from XML to mySQL.
I am trying to get a webpage to parse using the following code. <var-def
I am using following code to get bitmap from url. This function is used
I have the following XML Parsing code in my application: public static XElement Parse(string
I am trying to display some xml data from remote URL using jquery and
I'm attempting to parse XML in the following format (from the European Central Bank
The following code compares two XML texts and returns a collection of data changes
Hello all I'm using NSXMLParser to parse some xml data. I'm using this data
I am using the following code for parsing an XML file. But I don't
I'm trying to extract some data from XML using Linq to XML, and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.