Postponed
Project:
Registration Date
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
15 May 2012 at 11:00 UTC
Updated:
26 Nov 2012 at 23:28 UTC
Jump to comment: Most recent
Add offsets to date functionality. e.g: Close X days before Y date field value.
Comments
Comment #1
dpiAt this point in time, I'm thinking of using an integer field, recommending the widget form provided by timeperiod as a solution for UI. However this module does not support negative values.
Positive values: Close X days after Y date field value.
Negative values: Close X days before Y date field value.
Tracking timeperiod issue: #1604830: Allow option for polarity
Comment #2
dpiOffsets have been implemented using integer fields. It can currently be found in -dev, its first release will be alpha1.
Simply attach an integer field to your host entity type and configure the offset field on your registration field settings. Values such as -3600 (60mins * 60seconds) mean open/close 1 hour before datetime is reached.
This issue will remain open until a better widget is available.
Comment #3
dpiIf you want a nice widget, I recommend checking out the 'Polarity' branch in http://drupal.org/sandbox/danph/1612248 this is the best solution I can offer at this time.
Postponed: Until fago gets back to me regarding inclusion into timeperiod.
Comment #4
socialnicheguru commentedWhen I think of when to open and close an event registration, it is usually relative to the start time
Ie. if my event start on Feb 1,2013
I might want my registration to start 30 days before or today (now)
I might want it to close 2 days before
as it is now though
I can only enter one value for my date field, Date (value).
I have one field_date and shows only the first value and not the second.
I assume Date(value2) is the end date. Please confirm that? if it is just the start date, then this is mote.
Comment #5
socialnicheguru commentedthis might also be interesting to give the user the option of selecting a date by which the registrations should open or close and the calculations could be done on the back end
http://drupal.org/project/integerdate
Comment #6
dpiRight. I realise this needs to be added: #1684964: Use date for more than one operation
This is correct.
I do not exactly know what this means. Please explain in a different issue as this issue was for "Adding offsets".
Comment #7
socialnicheguru commentedI was thinking that for offsets i could either specify a number or select a date and the system would do the offset calculation on the backend. That was all. if you think this should still be a separate feature request, I will.
Comment #8
rootworkThe offsets are there now, which is nice, but other than in comment #2, it doesn't specify anywhere what value the offset should be in. Perhaps add this to the field caption somewhere and/or documentation?
Even better would be allowing a picker so that you could choose [integer field] + [dropdown: years, months, weeks, days, hours, seconds] (or whatever is practical to support there -- but something more than seconds alone). You could even add a +/- drop-down to make it clear that it takes negative values.
Comment #9
dpiThe offset is an integer field. Therefore, the value is a number.
There is no need for
+ [dropdown: ...etc.The integer field is transformed into years, months etc by using timeperiod field widget, as opposed to a plain textfield. Read #1.
Internally the data is stored as seconds. However the user will only see years, months etc.
Comment #10
socialnicheguru commentedUsing timeperiod works.
But I would like to specify close and open registration from the start of the event.
I can only choose either the start or the end date/time for either open or close registration now
Comment #11
mrpauldriver commented@dpi Are you able to provide an update about a decent widget for offsets?