i'm a bit confused - how might this be used alongside or separate from date? e.g. if i'm using date to handle a custom content type 'event' and views/views calendar to expose these events to users, how might such a content type also benefit from 'duration'? could it replace the "repeat" portion of an event (that area is too nerdy for most users, too many boxes and rows to choose from)?

it's just a bit unclear on the project page...like how far can you go with this thing? what might it be used for?

Comments

jpetso’s picture

Status: Active » Postponed (maintainer needs more info)

The original use case for this thing was specifying the time need for a task in our issue tracker, and the fact that I had to do calculations with it. A "Number" CCK field can only hold a single metric (e.g. hours) whereas I needed the ability to specify (and display) durations in different granularities such as hours, days or weeks. And I needed to add that time to an existing DateTime object.

The Duration module is exactly what the term "duration" stands for: a timespan without start or end date. It's most probably not suited in any way for specifying recurring events, it might be a possibility to specify the length of it (like, "date + duration" instead of "start date and end date"). If you don't need to handle different time metrics or do programmatic calculations, you might be better off with simpler fields like a simple "Number".

Also, have you even tried out the module? Your posting does not sound like that's the case, and I would really recommend to evaluate stuff that one considers for use on their site. In the time that I needed for writing this reply, you might as well have found out first hand.

Anyways, does that answer your question? As for documentation and screenshots, I won't invest a lot of effort there as it all comes back to me in terms of more work, and stuff. I published this module because it's good, reusable code and I thought someone else might have a use for it - if the existing functionality and documentation does not match anyone's requirements, that's fine with me. The Duration module is pretty much intended as "be happy as is or help improving it" software, I do not intend to spend much time on further improvements because it (nearly) fulfills my needs. Maybe that should be expressed more clearly on the project page.

zilla’s picture

@jpetso -thank you for taking such serious time to answer this, and yes, i am going to be trying it out right now - took me a minute to get my head around it but it makes crystal clear sense and could be extremely useful alongside date

my example: a community site, a member posts an event (custom content type using cck/date/calendar etc - not 'event module') - there's an unlimited option for 'from' and 'to' because, for example, a soccer practice may run from 5 to 7 pm every monday for the next 5 weeks and so on...in that case the 'from and to' date fields are logical, including repeats etc

BUT there are also situations where a 'thing is going on' and somebody needs assistance for specific periods of time - so in this case it's not really an 'event', it's more like a 'help needed/volunteer' content type - and so it also has dates (e.g. "i need people to help me from the 15th through the 19th") but the times are less relevant, it's more like "i need people for about X hours/days/etc" - in which case duration independent of time is much more logical, and in fact the 'times' probably shouldn't even really appear as they bear less relevance...

sorry, i'm rambling, if i can get this variation working with some tangible examples in node forms i'll grab some screenshots and will repost them here in the support forums for this module - thinking of using it immediately for a local classifieds category [people need tutors, babysitters and so on - and others offer these services - but not jsut by date, also by duration, which is far more critical for 'regular things' like ongoing sitting, tutoring, etc since the dates change but the same tutor may only ever offer 30 minute lessons etc...

jpetso’s picture

Status: Postponed (maintainer needs more info) » Fixed

Oh, hey, that's cool. Duration might actually fit in there, and contributed documentation is of course highly appreciated :)

I hope I didn't sound too harsh before. So the issue can be marked as fixed if I understand correctly? Let's proactively do that, you're welcome to reopen it if you feel that some point needs to be resolved yet.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

izmeez’s picture

@zilla,

Did you arrive at a solution for your case using duration?

Izzy