Plugin

Archived
Forum
(read-only)

Jeremy Worboys does not actively monitor this forum
(but you can still get help from other EE users).

CC Time Difference

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Jeremy Worboys

     

You must be logged in to post.

Before or After?

General (Resolved)

grovberg
grovberg

Say the time I want to evaluate is 5:30.

At 5:20 there is ten minutes between those two.

At 5:40 there is also ten minutes between those two.

So would CCTD give the same result for each? Is there any way to distinguish between the two?

Jeremy Worboys
# 1
Developer
Jeremy Worboys

Hi,

Currently there is no difference, the results would be the same.

If you could provide a code example as to how you would use this I may be able to add this functionality to the plugin.

grovberg
# 2
grovberg

I never got as far as writing code, but I basically wanted to use it with events we’ have on a calendar. So an event might be “In 3 days” or it might be “3 days ago”. One way I thought it might work is by providing negative values if it’s in the future (or vice versa).

No big. Thanks for responding.

Jeremy Worboys
# 3
Developer
Jeremy Worboys

I’m heading off for the night now, but I’ll see if I can whip something up for you in the morning.

Jeremy Worboys
# 4
Developer
Jeremy Worboys

I have added the

compare 

conditional that you can now use to make this distinction.