I'm attempting to create a custom member tag for my forum that will display "X Years of Experience" but with different colors for each individual year, such as red for year one, blue for year two, and so forth.
Getting the date difference was simple enough but I'm stumped on the next bit.
This is the code I currently have:
{{$joinDate = $comment->author()->get_joined(); $currentDate = new \DateTime(); $interval = $joinDate->diff($currentDate); $experience = \IPS\DateTime::formatInterval($interval, 1);}}
<li class="ipsType_light">{$experience} {lang="memberexperience_experience"}</li>