Greg's Baby (gregsbaby64) wrote in component_help,
Greg's Baby

  • Mood:

Countup code

I fiddled around with the code from edupenguin in this entry and came up with a quick and easy thing you can do to the code to make it count up from a day vs. count down to a day. So if you wanted to count from the day your LJ was born, the day you quit smoking or the day your child was born, you can now do that. Tested on my community webgirlie and this code is ripped right from my theme code. All I did was change $e1days = $e1days + $e1diff_day; # add difference in days to days to $e1days = $e1days - $e1diff_day; # add difference in days to days

Edited to post that it only works in the existing month. If someone comes up with the code for a countup counter, please let me know. I removed my code, as it wasn't necessary, it doesn't work correctly. Back to the drawing board!

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened