Date

KarenS - June 27, 2006 - 01:17

This package contains both the Date module and a Date API module. The Date API is available to be used by other modules and is not dependent on having CCK installed.

The date module is a flexible date/time field type for the cck content module which requires the CCK content.module and the Date API module.

Features

  • date.module can store dates in two ways, as an iso date (YYYY-MM-DDTHH:MM:SS) or a unix timestamp
  • multiple widgets are available for date input - a drop-down selector, a javascript pop-up, and plain text that accepts ISO format or anything strtotime allows
  • Create dates with a single input element, or add a second date input element to create 'From' and 'To' dates.
  • Use the Views Calendar to display CCK dates in calendars.
  • Use the included Date Browser Views plugin to add flexible date-based grouping and paging to any View that uses a CCK date field as an argument.
  • Multiple formatters for the date display are available, including site date formats, custom format strings, and a selection of ISO, iCal, and feed formats.

What's New in Version 2

A new, version of this module is being developed. There are no changes to the database, but the API is significantly different. The Calendar module (http://drupal.org/project/calendar) is being updated to work with the new API.

Important Notices

  • The new version has several new files and is completely re-organized. Empty the module folder completely before adding the contents of the new version. If you don't do that, Drupal may try to use some of the invalid, older files and things will not work correctly. After updating the files on your system, visit the modules page and look for the new Date/Time section and enable the new modules. Then visit update.php to update your database.
  • If you use the Token module, be sure to use the latest version of it. The older version was using the older Date API.
  • If you use Views, you need a version dated January 2008 or later, since there is a bug in earlier versions that will affect the way the Date API structures its queries.
  • Version 2 of the Event module is currently incompatible with the Date API, since the Event module has a different method for setting site and user timezones that keeps the Date API from working correctly. The Date Copy module has a conversion program to convert Event fields to Date fields, if you want to switch to using Date and Calendar.

New Features

  • The Date API now uses PHP 5.2 date functions for better date and timezone handling (and has PHP 4 emulations for those functions so the module will work in PHP4). Although the code will work with PHP 4, it is significantly faster and more efficient under PHP 5.2 or higher, so PHP 5.2 is highly recommended.
  • The database query handling has been completely re-worked to take advantage of database timezone handling when available, with a fallback to the older and less reliable method of using offsets to do timezone adjustments.
  • No more need for the adodb date library, historical dates earlier than 1970 and later than 2038 are handled without any external code.
  • iCal integration is greatly improved, an iCal parser can parse events, alarms, most types of dates and timezones, duration, repeat rules, and more.
  • The Date API creates date elements that can be used by any module, including 'date_select', 'date_textfield', and 'date_timezone'.
  • A new Date Timezone module overloads the site and user timezone selectors to allow you to select a timezone name instead of a timezone offset, and that stored name is used to properly adjust date values. It also detects the user's timezone name automatically and updates the user record with that name.
  • A new Date Popup module creates a jQuery popup calendar date picker and time picker, and the element is available to other modules as a form type of 'date_popup'.
  • The Date module now has lots of new ways to define default values -- you can set a the default to 'blank', 'now', or 'relative', where relative is something like '+90 days'. The To date has a separate default value, which can be the same as the From date or do something different.
  • A Date Repeat API module has been added which can be used by any other module. The CCK Date module uses it to allow you to select 'repeating' as a type of multiple date, present the user with a form to select the repeat rules for their date, and then create all the multiple values that match those rules.

Releases

Official releasesDateSizeLinksStatus
6.x-1.0-beta2008-Apr-24156.49 KBRecommended for 6.xThis is currently the recommended release for 6.x.
5.x-2.0-rc2008-Mar-11151.17 KBSupported for 5.xThis release is supported but is not currently the recommended release for 5.x.
5.x-1.82007-Dec-2898.21 KBRecommended for 5.xThis is currently the recommended release for 5.x.
4.7.x-1.72007-Jul-0670.08 KBRecommended for 4.7.xThis is currently the recommended release for 4.7.x.
Development snapshotsDateSizeLinksStatus
6.x-1.x-dev2008-May-16158.18 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
5.x-2.x-dev2008-May-16154.57 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
5.x-1.x-dev2008-Feb-2499.05 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
4.7.x-1.x-dev2007-Dec-2870.9 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
 
 

Drupal is a registered trademark of Dries Buytaert.