WordPress plugin intelligence profile

GCal Days

Shortcode and functions to query your Google Calendar for the number of days since or until the most recent event matching your search criteria.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.5
Current version1.2
WordPress coverageTested up to WordPress 4.5
Minimum stackWP 3.6 · PHP —
Directory statusactive
Last directory update25 May 201610y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records GCal Days version 1.2 as active, updated 10y ago and tested up to WordPress 4.5.

Overview

About this plugin

This plugin provides a shortcode and a set of functions to return the number of days since the most recent past event in your Google Calendar matching specified search terms. The shortcode can also be used to return the number of days until the closest upcoming event matching specified search terms.

The Shortcode

[gcal-days search="" type="" id=""]

The shortcode name is gcal-days. It has three attributes, but only one of which is absolutely necessary:

  • search: (Required.) The search term.
  • type: (Optional.) The direction in time to search. Defaults to “since”, which searches past events. “until” will search future events.
  • id: (Conditionally optional.) The ID of the calendar to search. You can discover the IDs of calendars via the plugin’s settings page. This shortcode attribute can only be optionally omitted from shortcodes if you define a default calendar in the plugin’s settings.

The shortcode outputs a number representing the number of days until a matching event. If no event is found, a -1 will be displayed.

com"]

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Functions

php, or in plugins.

Functions

  • <?php function gcal_days_since( $search, $calendar_id = '' )?>
  • <?php function gcal_days_until( $search, $calendar_id = '' )?>

Arguments

-

$search (string)

Required. The word or phrase to search for

-

$calendar_id (string)

Optional. The ID for the Google Calendar. Check the plugin’s settings page for calendar IDs.

This argument is only optional if you have defined a default calendar via the plugin’s settings.

Return Value

An integer value of the number of days since/until the matching event. -1 is returned if no event was found or an error was encountered.

Examples

-

php // Days until next dentist appointment

$days_until = gcal_days_until( 'dentist' );

>

-

php

// Get the days since my last day off

$days_since = gcal_days_since( 'day off' );

// Echo a message using that number

if ( -1 == $days_since ) {

echo "You've never had a day off?! ";

} else {

', $days_since ), $days_since );

}

>

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • days since
  • calendar
  • gcal
  • google
  • shortcode
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.5
Minimum requirementsWordPress 3.6 · PHP not listed
Update activity25 May 201610y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.