| /[drupal]/contributions/modules/date/date_api.module |
Parent Directory
|
Revision Log
|
Revision Graph
| Links to HEAD: | (view) (download) (as text) (annotate) |
| Sticky Tag: |
Lots of renaming of field and instance values to match the new array structures.
Getting HEAD ready for D7.
Prepare HEAD for D7.
Prepare HEAD for D7.
Exposed filter querystring must be appended in normal views.
#494350 Add 'c' format.
Update drupal_write_record() to use new date_formats table name.
#452934 Make sure format_interval doesn't try to do anything with empty dates, patch by thekevinday.
#483682 and #395156 Have to alter the collation of the format fields in MYSQL so they don't do case-insensitive searches and indexes. Fixing table name at the same time to fix another sporatic problem where 'date_format' is treated as an invalid table name and the table is not created.
#473308 Add handling for year-only date stored in timestamp field, patch by muka.
#473308 Add handling for year-only date stored in timestamp field, patch by muka.
Add new calendar-day theme to format date like a calendar day page, move basic theme date_time_ago() from Date module to Date API so other modules can use it.
Remove date_format_options() from Date API, no longer used with new format system. Move it to Date Popup, which is the only module still using it with TODO to maybe get rid of it.
Fix date_limit_format() to be sure the 'T' is stripped out of ISO dates with only date or only time.
Fix date_limit_format() to be sure the 'T' is stripped out of ISO dates with only date or only time.
#369020 Switch '+1 Sunday' to 'First Sunday' to over PHP5 bug.
#369020 Switch '+1 Sunday' to 'First Sunday' to over PHP5 bug.
#418206 All date elements should be in datetime format when processing elements, patch by scottgifford, vince, and karens.
#442526 Add missing space to navigation template, patch by Moonshine.
Lost the regex to remove AM/PM in date_limit_format().
#375864 Clean up date_limit_format() to handle more odd formats.
#375864 Clean up date_limit_format() to handle more odd formats.
#447616 Allow custom tables as well as custom fields to use Date argument and filter, patch by agentrickard.
#338253 Fixes to translation of timezone names, patch by emok.
#338253 Fixes to translation of timezone names, patch by emok.
#310438 Clear up confusion when more than one date filter is used in the same view.
#395156 Hide errors during multiple passes of date_format creation, patch by quicksketch.
#385880 Add non-node date handling for Views arguments and filters, patch by setvik. Also update Advanced help to explain how custom modules can add their own dates to the filter and argument.
#369811 Fix problems with duplicate date formats in new format system, patch by stella.
#354989 Make sure year-only date does not regress to YYYY-00-00 00:00:00, which will end up as previous year.
#354989 Make sure year-only date does not regress to YYYY-00-00 00:00:00, which will end up as previous year.
#398258 Fix problems handling blank text widget values and general form processing cleanup.
#398258 Fix problems handling blank text widget values and general form processing cleanup.
#397420 Fix miscalculation errors in date_difference, patch by eloish.
#397420 Fix miscalculation errors in date_difference.
#375864 Make sure date_limit_format() doesn't keep formats that are only escaped strings.
#375864 Make sure date_limit_format() doesn't keep formats that are only escaped strings.
More small fixes to the new format and translation code.
More small fixes to the new format and translation code.
#375551 Fix fatal typo in reworked date_format_date() function.
#338253 Re-work the Date repeat description to provide more context for translations.
#338253 Re-work date_t() to create a more robust method of handling translations of abbreviations and other short strings.
#337301 Move hook_schema_alter from date_api.module to date_api.install.
Add our custom date formats as values on the core locale form so we don't get errors on submission if they are missing.
#370092 Add all-day checkbox to date field and use it in calendar, patch by Aron and others.
Fix bug that caused date_select to end up as current date.
Fix bug that caused date_select to end up as current date.
Make the year range regex a little more flexible.
#360670 Rework date_range to better handle absolute as well as relative years in argument and filter.
by stella, nedjo, grugnog2, and catch: #318008 Create new system for handling flexible date formats that can be adapted to locale.
Make sure prev/next links point to the right path when another argument precedes the date argument and is empty.
Fix broken handling of some partial (year or month and year) dates and pave the way for fuzzy granularity by adjusting date_is_valid() and date_make_date() to better handle partial dates.
Fix broken handling of some partial (year or month and year) dates and pave the way for fuzzy granularity by adjusting date_is_valid() and date_make_date() to better handle partial dates.
#347878 Translation fixes, patch by hass.
Synch HEAD to latest D6.
Synch HEAD to match D6.2 branch.
Fix logic error in date_convert when using timestamp with timezone other than UTC.
Fix logic error in date_convert when using timestamp with timezone other than UTC.
Fix logic error in date_convert when using timestamp with timezone other than UTC.
Fix logic error in date_convert when using timestamp with timezone other than UTC.
#337301 Add hook_schema_alter to record addition of timezone_name to users table.
Rename values added to views to avoid name clashes and keep all date values together.
#336109 Add handling for ordinals to custom date formatting.
#336109 Add handling for ordinals to custom date formatting.
#303951 Relax requirements for text date input to allow single digit months and days.
#303951 Relax requirements for text date input to allow single digit months and days.
#309617 Make DATE_REGEX_LOOSE a bit looser so the @ argument will work right for single digit months and days, patch by Waldemar.
#309617 Make DATE_REGEX_LOOSE a bit looser so the @ argument will work right for single digit months and days, patch by Waldemar.
#314012 Move date_views_filter_value() to date_api.module so it's available if Date module is disabled.
Fix PHP4 timezone problem that didn't save timezone changes correctly in rare cases when refreshing zones using devel.
Fix PHP4 timezone problem that didn't save timezone changes correctly in rare cases when refreshing zones using devel.
Fix timezone caching -- it was resetting when it didn't need to, consuming resources.
Fix timezone caching -- it was resetting when it didn't need to, consuming resources.
Found some timezones that can't be used in PHP4 because we don't have offset information, so remove them from timezone lists.
Found some timezones that can't be used in PHP4 because we don't have offset information, so remove them from timezone lists.
#327506 Detect and trap bad timezones in ical import so they don't create errors.
#327506 Detect and trap bad timezones in ical import so they don't create errors.
Default the block_identifier to NULL, not 'mini'.
Remove ical import from Date Copy and add instructions on how to do it using Feed API to Advanced help.
Add a date_embed_view() function to provide a way to embed views and have their navigation move either together or separately, and document it in Advanced help.
Get the links in embedded views and blocks to work correctly using a helper function date_real_url().
Make sure 'time ago' formats will work in calendar by adding more separation into the format_interval formatter.
#240156 More fixes for conflict between Date and Event, make sure the timezone name list has only entries that will work in both modules.
#240156 Workaround conflict between Event and Date by using #process on timezone forms to override Event module handling.
Date PHP4: Add new settings area where you can choose whether to use the faster native timezone adjustments for current dates.
#308353 Long month name translations again, I applied the fix to the wrong function, patch by emok.
#305376, #303999 Change method of clearing theme registry to avoid errors other themes during update.php, patch by chrisearle.
#308353 Use long-month-name protocol for translations, patch by emok.
#306819, #307406 Month translated was using wrong variable name, patch by alexpot and slybud
Fix critial error in date_t() that was returning nothing for translated names.
Fix typos in new date_api_views_clear() function.
#303999 Add function and update to clear out theme registry and all the views caches to pick up changes in Views definitions.
Clean up some translation strings.
Keep devel module clutter out of .pot file, clean up some translation strings.
Update to new Views2 API. Now requires latest versions of Views and CCK, and files have been re-arranged.
Move timezone handling logic to Date API so we can use it in Calendar, too.
Move timezone handling logic to Date API so we can use it in Calendar, too.
Replace all include_once() with require_once().
Replace all include_once() with require_once().
#276270 Add missing break in date_convert() switch for ICAL, patch by c.lam.
#276270 Add missing break in date_convert() switch for ICAL, patch by c.lam.
#299112 Adjust date_convert() to adapt to am/pm when data source is an array. #299112 Don't change 12 hour time to 24 hour time until after validation.
#299112 Adjust date_convert() to adapt to am/pm when data source is an array. #299112 Don't change 12 hour time to 24 hour time until after validation.
Make sure date_week() trims input value so you can use it with a regular datetime value.
Make sure date_week() trims input value so you can use it with a regular datetime value.
Fix mistake that got into last commit.
#297733 Make more kinds of custom formats display correctly.
#297733 Make more kinds of custom formats display correctly.
#296051 Fix error in computation of last day of calendar month.
#296051 Fix error in computation of last day of calendar month, thanks to HnLn for debugging this!
Synch HEAD with D6.
Add new DATE_FORMAT_DATE for date-only format that is used throughout the calendar.
Add new DATE_FORMAT_DATE for date-only format that is used throughout the calendar.
Rework the install file so variables can be corrected and dependent modules enabled by disabling and re-enabling Date API. #280863 Make sure Date Timezone and Date PHP4 can be uninstalled by keeping module_enable() in the install.
Rework the install file so variables can be corrected and dependent modules enabled by disabling and re-enabling Date API. #280863 Make sure Date Timezone and Date PHP4 can be uninstalled by keeping module_enable() in the install.
#286454 Add fix for Views substitutions error handling %%s to work like the fix for %%d.
Move date_format_options() to Date API so other code can use it, copied D6 code instead of D5 code.
Move date_format_options() to Date API so other code can use it.
Move date_format_options() to Date API so other code can use it.
Fix some inconsistencies in the expectation of whether date_fuzzy_datetime returns a datetime or ISO value.
Fix some inconsistencies in the expectation of whether date_fuzzy_datetime returns a datetime or ISO value.
Don't use date_make_date() in date_convert() to avoid cyclical references.
Don't use date_make_date() in date_convert() to avoid cyclical references.
Add a template for the Date Views filter form.
Add PHP documentation about difference between Views widgets and regular FAPI element processing values.
One more small fix to date_limit_format() regex.
One more small fix to date_limit_format() regex.
Fix computation of 'N' in PHP4 date_format() wrapper to get date_week() working right in PHP4.
#275213 Wrong year value in date_week_range(), patch by casey.
#274403 Fix typo in date_hours(), patch by Ninja Overlord.
#274403 Fix typo in date_hours(), patch by Ninja Overlord.
#275490 Remove orphaned punctuation at beginning of string in date_limit_format().
#275490 Remove orphaned punctuation at beginning of string in date_limit_format().
Remove as many dependencies as possible from install files and auto-enable necessary modules.
Remove as many dependencies as possible from install files and auto-enable necessary modules.
#248338 and #254819 More changes to clean up date_limit_format() to better handle punctuation and escaped letters. Method of removing escaped letters was from IslandUsurper and seanr.
#248338 and #254819 More changes to clean up date_limit_format() to better handle punctuation and escaped letters. Method of removing escaped letters was from IslandUsurper and seanr.
#248338 and #254819 clean up date_limit_format() to better handle punctuation and escaped letters.
#248338 and #254819 clean up date_limit_format() to better handle punctuation and escaped letters.
#273130 Conform to new Drupal 6 method of indicating long and short month names, patch by emok.
Synch HEAD with the 6.2 version.
#261610 Create a way of displaying only a single date on a node to be used by the calendar js popup being developed by will_in_wi.
Add a is_string() test to the date_is_valid() function.
Add a is_string() test to the date_is_valid() function.
The timezone element can sometimes be nested.
Misc small fixes.
Date_fuzzy_date was not handling input from date_popup or date_text in the right way.
Date_fuzzy_date was not handling input from date_popup or date_text in the right way.
#260611 Replace substr with drupal_substr where used to get month and day abbreviations.
#260611 Replace substr with drupal_substr where used to get month and day abbreviations.
#270267 Auto-enable the Date PHP4 module when needed.
Fix computation of week range computed from views arguments.
More work to get the generic date argument handler pulled completely out of the Calendar module and into the Date API in a way that it can be used for any Views date field in any view.
#264208 Fix fatal typo in date_limit_format() regex, patch by JohnAlbin.
Cleaning up some of the Views code that was moved to the Date API.
Try again to get the right files into the 6.2 branch.
Get the 6.2 branch updated, I made the last commit to 6.1 by mistake.
Starting process of moving lots of similar date handling and navigation code out of Date and Calendar and into the Date API where we can use the same code everywhere. Adding a flexible date argument to the API that will work on any Views date field and take any ISO date argument. Adding an argument default option to set a missing date argument to the current date that will work on any date field. Adding a date back/next navigation attachment that works with the date argument and which can be attached to any view. Next step will be to go in and adapt the Calendar module to share this code instead of creating its own.
Fix typo in previous commit.
Fix typo in previous commit.
Add calendar week calculations to the Date API so we can move them out of Calendar module to be able to use them in any date application.
Add calendar week calculations to the Date API so we can move them out of Calendar module to be able to use them in any date application.
Fixes needed to display the timezone when that format is selected, and to pull the timezone out of format strings.
Fixes needed to display the timezone when that format is selected, and to pull the timezone out of format strings.
Fix for critical flaw in the new timezone list handling that was creating an invalid array. This should fix it.
Fix for critical flaw in the new timezone list handling that was creating an invalid array. This should fix it.
#257059 and #248935, committing a work-around for a Views error that has been fixed but is not in an official release yet.
Working in a new sql handler class so we can use the same class in both.
Working in the new sql handler class from the D5 version so we can use the same class in both.
#256079 make translation of abbreviations easier, patch by josueaclade.
#256079 make translation of abbreviations easier, patch by josueaclade.
Prepare for proposed core timezone handling from #11077 by getting rid of deprecated timezones and adding in js timezone name detection. Rework default timezone handling to force a valid date even when timezones are not set to get rid of numerous installation and operational errors caused by invalid date objects.
Prepare for proposed core timezone handling from #11077 by getting rid of deprecated timezones and adding in js timezone name detection. Rework default timezone handling to force a valid date even when timezones are not set to get rid of numerous installation and operational errors caused by invalid date objects.
#251511 Rename function to avoid clash with Diff module.
#251511 Rename function to avoid clash with Diff module.
Left debugging cruft in last patch.
Can't use date_make_date within date_part_extract without setting up potential circular reference.
Can't use date_make_date within date_part_extract without setting up potential circular reference.
#236889 Make sure date_select validation only checks required granularity.
#236889 Make sure date_select validation only checks required granularity.
#234073 Provide a way to make a required date start out with blank values.
#234073 Provide a way to make a required date start out with blank values.
#233105 rework date interval processing, patch by michaelfavia.
#233105 rework date interval processing, patch by michaelfavia.
#225738 Add special case handling for year only or year and month only ISO dates.
#225738 Add special case handling for year only or year and month only ISO dates.
Clean up to prevent undefined index error and correct theme names.
#232366 & #232201 make sure empty date object is not formatted, patch by senseBOP.
#232366 & #232201 make sure empty date object is not formatted, patch by senseBOP.
Fix site and user timezone forms to work correctly with D6 code.
#210687 Improvements to ical date parsing, patch by Susurrus.
#210687 Improvements to ical date parsing, patch by Susurrus.
Can now create and single value date and store it. Can't display it yet, though.
Add theme functions for all the form element themes.
Get date popup working in node author section and fix validation and form_set_value code to work right in Drupal 6.
More work on port to D6. Still absolutely not ready to use.
Very first pass at porting HEAD to 6.x. Totally broken. Do not use!!
Simplify the API by assuming all date element values are handled in DATETIME format. The CCK Date module handles conversion of ISO and UNIX values to and from DATETIME values. This simplification of the core API should make it easier to get into core and makes the element handling easier to follow, plus I assume the first thing we'll do when a date API is in core is convert core timestamp fields to true DATETIME fields, so this would be the natural default.
Simplify the API by assuming all date element values are handled in DATETIME format. The CCK Date module handles conversion of ISO and UNIX values to and from DATETIME values. This simplification of the core API should make it easier to get into core and makes the element handling easier to follow, plus I assume the first thing we'll do when a date API is in core is convert core timestamp fields to true DATETIME fields, so this would be the natural default.
Make allowances for special cases where the timezone is needed in a date conversion so that conversion to a timestamp doesn't get reset to the UTC value.
Make allowances for special cases where the timezone is needed in a date conversion so that conversion to a timestamp doesn't get reset to the UTC value.
Don't process empty date.
Don't process empty date.
Remove database timezone handling by rolling back to previous version that used offsets instead. Based on problems noted in #218479 and #220663, we cannot count on database timezone handling to be available in MYSQL or work consistently with the timezone names that PHP uses in POSTGRES, so trying to do timezone conversions in the database is not going to work. Synch with D5.2 version.
Clean up work on popup module.
Clean up work on popup module.
Code clean up using coder module.
Code clean up using coder module.
#213038 Loosen regex for month and day names to pick up non-ASCII characters like the German umlaute.
#209189 Move the adding of date.css from Date Timezone to Date API so it is always available. Add dependency on Date Timezone to Date Popup so timezone conversions will work.
A very very very very rough implementation of a repeating date in the CCK date module using Date Repeat. Still needs lots more work.
Wrong fix earlier on REGEX_LOOSE, the year must be four digits. Fix PHP4 wrapper to be sure year is always padded to four digits. Get tests working for PHP4 date_modify wrapper.
Several fixes to make sure very old 3 digit years like 100 are properly handled. Fix error in date_convert() that threw out a unix date with a zero value.
Fix critical typo.
Standardize on date_make_date() instead of calling date_create() in some places so there is a central place to test the timezone and date values before creating the date. Add method to customize the labeling of date parts to allow the label above the date part, inserted as the first item in the options array, or omitted. Remove some functions that are not being used or move them so they are called only when needed to clean up the code.
Fix formula for date_diff in weeks.
Miscellaneous changes - split out function to return the format string used by a specified formatter, another attempt to clean up the display of from/to dates to print shared values only once.
The 'loose' regex wasn't quite loose enough. It should also allow for an input format that has hours and minutes but no seconds.
Finally found elusive source of error that was corrupting the date values.
Add conversion functions for iCal date, more cleanup of date_repeat and add a warning in the date_repeat info file that it is not ready to use yet.
Get rid ofdate_api_load() and just include file normally. Not using it enough to carve it out as a function.
Move setting of variables to the install files. No need to set them on every page.
Fix missing #date_type values in date_popup module.
Clean up formatter code in Date module to make D6 transition easier.
More reworking of the new API. Too many fixes to mention, but it is starting to feel fairly stable now.
Rework the logic for handling the date timezone and converting from and to the db storage timezone. Finally realized the widget cannot do the timezone transformation, the widget must always be handling a date in the same timezone so validation and other processes can work correctly no matter what route the form takes. It will be up to the field, not the element, to transform the date from gmt to the local timezone when the date is retrieved from storage and back again before saving it. This is the first of a series of updates to get this change implemented. Things are likely to be buggy untill all these changes are reworked and committed.
And another improvement to date_diff()
Improvements to date_diff()
Cleanup of date_diff computations.
Move the javascript timezone detection to the timezone module.
The Date Repeat API is mostly complete and can parse an iCal RRULE and return an array of dates that match the rule. Also added extensive simpletests on a variety of iCal RRULEs to test the logic. Not all iCal elements are included in this version, but the most common ones are. The API is not yet tied back into the Date module, so you can't do anything with it yet.
More work getting date_repeat form working. This is not yet usable!
Get rid of constants for DATE_TIMEZONES and DATE_API_PATH since they sometimes don't get defined before they are needed.
Cleanup calendar ical import.
Still experimental, use improved ical parser to extract ical data and import it into date fields.
Add simpletests
Move override of site and user timezone setting into its own module so it can be turned on or off and removed once this is done by core. Also make PHP4 handling into a module instead of an include file so it can be turned on or off and removed once core no longer supports PHP4.
Fix parse error.
#178409, patch by moofie, make sure empty value for weekdays uses blank instead of zero.
#178412, patch by moofie, make sure date passed to date_is_valid has a day, make sure date values are left-padded with zeros so the regex will work.
#178427 misc fixes by moofie to fix typos and make sure timezone selection works right with profile module.
Reduce confustion by standardizing on use of 'month' instead of 'M' or 'mon', 'day' instead of 'D' or 'mday', etc, in granularity and date arrays.
Found a cleaner way of grabbing the timezone name from the browser date string to update the user record.
Added in javascript handling that will automatically detect the user timezone name and update the value.
Preparing for Version 5.2. The only database changes in 5.2 are changes to settings, so adding the enough changes to current version so it is possible to try 5.2 out and return to this version with no loss of data. In 5.2 settings changes will add several ways to control default values and other improvements which are just placekeepers to prevent data loss in this version.
Add requirements to check that the default site timezone name has been set, add #validate handlers for setting site and user timezones.
Add in option to set different default values for the from and to dates so you can have something like the current date as the from date and one month from now as the to date, move the titles of the date_select sup-parts (year, month, day, etc) to a theme for easier overrides
Split elements between re-usable ones and cck-specific ones, rename some files, change element handling to match the way things will work in the D6 version of CCK to make porting easier, lots of small fixes from testing and debugging.
Clean up date_is_valid logic.
Get rid of date_part_is_valid() which got too recursive and stick with just date_is_valid(); move hook_elements() to date_forms.inc so all element code is together for clarity and easier debugging; break up processing in Date module so each process is for a single element for consistency with the way things will work in the 6.x CCK port; more cleanup of the date processing and validation;
Reorganize files and folder; Add experimental jquery date_popup; Numerous other fixes and updates to get version 2.0 working.
More fixes to timezone and views handling.
Fix ical duration parser to use new date functions to more reliably calculate duration; make an ISO date a valid input in the PHP 4 emulation; more clean up of date forms handling; use new date functions in date_views.
More work on creating a 5.2 branch with an improved Date API that uses PHP 5 date functions. Includes beginnings of a date_repeat module and much improved ical parsing. Not ready to use yet, more work to be done.
Very preliminary rewrite of Date API to become version 5.2. Not ready to be used yet! Still coming is rewrite of date and calendar module to use new API.
Get rid of hook_init(), add helper function date_load(), move date.inc constants to date_api.module.
Get rid of hook_init(), add helper function date_load(), move date.inc constants to date_api.module.
#153245 fix typo in Date API documentation, patch by beginner
#153245 fix typo in Date API documentation, patch by beginner
Removing files from HEAD, development will be in 5.x branch until ready for 6.x
#121484 mis-named help function
#121259 split date api out so it can be used by other modules with no dependency on CCK
#121259 split date api out so it can be used by other modules with no dependency on CCK
file date_api.module was added on branch DRUPAL-5 on 2007-02-21 14:15:38 +0000
file date_api.module was added on branch DRUPAL-4-7 on 2007-02-21 14:08:33 +0000
#121259 split date api out so it can be used by other modules with no dependency on CCK
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.