Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
3 posts Page 1 of 1
Hi, this is a way to see the % of completion of progress based on difference between dates.

If some project starts at date1, then ends at date2 then we know the total number of days between these days.
Given any 3rd point, like 'today' - we can measure the progress with formula

start: 0% | ------- ---------- ---------------| 70% | ------------------| 100% end
date1 ----------------------- some intermediate date3 ------------ date2

( date3 - date1 ) / ( date2 - date1 ) * 100 = progress in %.

The main novelty of this tag is synonyms for parameters.
Sample usage: <cms:date_progress from=date1 to=date2 boundary=date3 />

Parameter boundary is optional. If it is not set - then today's date is used.

Synonyms: Instead of remembering 'from' and 'to' - feel free to use any of the following:
'from', 'start', 'begin' - for indicating starting date
'to', 'stop', 'end', 'finish', 'complete' - for indicating final date
'cutoff', 'fold', 'threshold', 'boundary', 'current', 'limit' - for indicating the boundary.

The same way can be added labels in your own language( if it uses latin caracters ).
So, code and have no stress :lol:
Ok man, to be honest, this help me :D
nice job mate!
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
GoingMarryAsap wrote: Ok man, to be honest, this help me :D
nice job mate!

Thank you for the feedback :D
3 posts Page 1 of 1