Closed (duplicate)
Project:
Date
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2006 at 14:21 UTC
Updated:
19 Nov 2006 at 16:28 UTC
This is a great module for selecting a specific point on a timeline. However, oftentimes what is needed is an interval or delta between dates, e.g. 1 Day, 1 Week, 1 Week 2 Hours.
Of course, this value can be stored as integer and even prettied up with improved optionwidget patch (http://drupal.org/node/89172) to display date labels for example like this:
3600|1 Hour
7200|2 Hours
86400|1 Day
Instead of using integer fields (expressed in seconds or milliseconds) perhaps date is the place to put intervals. This widget should be very simple to implement with format_interval function.
Comments
Comment #1
karens commentedI don't understand this request. Are you looking for a way to automatically generate repeating dates based on an interval, or what do you mean to do with the interval? I just can't visualize where this would fit into a form where you are creating or editing a date.
Comment #2
dkruglyak commentedMaybe this does not belong to date module after all, but I think there is need to handle differences between dates.
Let me give an example. If you want to use CCK to hold info on how often a certain event occurs, you would express it in terms of time between occurences (1 week, 1 month, every 2nd Sunday, etc).
This is certainly a date-related data type, however it is often not flexible enough to be expressed in integers of seconds. For example if you want to express days and weeks that is easy (same number of seconds that lend themselves to storage as integers), but months are not (differing number of seconds, depending on a month).
So what is needed is ability to express a delta between two dates - to support recurrence logic.
Comment #3
karens commentedI think you are looking for this http://drupal.org/node/80592, which is an existing feature request. I probably need to re-name that issue.
Comment #4
dkruglyak commentedMarking duplicate, adding a comment on the main issue.