New feature added - countdown
Last Post 02-18-2010 8:48 AM byAshlar. 0 Replies.
    Printer Friendly
    •  
    •  
    •  
    •  
    •  
    Sort:
    PrevPrev NextNext
    You are not authorized to post a reply.
    AuthorMessages
    Scott RoweUser is Offline
    ReefChat Staff
    Basic Member
    Basic Member
    Send Private Message
    Posts:333
    Member Since: 02-17-2007 5:04 PM
    Scott Rowe

    --
    02-18-2010 8:48 AM

      I've added a new function that you can use in your template contents to display the amount of time elapsed since a date / time or until a date / time.

      You could use this to display the amount of time a tank has been up, or how long it's been since your last water change, or when was the last time you added a coral, as an example. It can also count down toward a certain date / time, like MACNA, or a club event.

      The function is called "countdown" and it takes two parameters- the first is the target date. This can be in almost any format that has both a date and optionally a time component. "January 1, 2010", "1/1/2010", "Jan 1 2:00pm", "1/1/2010 14:00:00" etc. The second parameter is related to the data format for the output, and it's a numeric value from 1 to 6. Let me give some examples for the command with different formats..

      "It's been [countdown "1/1/2010" 6] since Jan 1."
       
      would result in..
       
      It's been 0 years, 1 months, 18 days, 8 hours, 46 minutes since Jan 1.
       
      "It's been [countdown "1/1/2010 04:00" 5] since Jan 1."
       
      results in..
       
      It's been 0 years, 1 months, 18 days since Jan 1.
       
      "It's been [countdown "1/1/2010 04:00" 4] since Jan 1."
       
      results in..
       
      It's been 1 months, 18 days since Jan 1.
       
      "It's been [countdown "1/1/2010 04:00" 3] since Jan 1."
       
      results in..
       
      It's been 6 weeks, 6 days since Jan 1.
       
      "It's been [countdown "1/1/2010 04:00" 2] since Jan 1."
       
      results in..
       
      It's been 48 days, 8 hours, 50 minutes since Jan 1.
       

      "It's been [countdown "1/1/2010 04:00" 1] since Jan 1."

      results in..

      It's been 48 days since Jan 1.

       

      I know this is a pretty esoteric feature, but hey, if someone besides me finds it useful, all the better.

       

      You are not authorized to post a reply.


      Active Forums 4.3

      Find Your Group

      No matter how you connect, you'll find your group - whether it's about Nanos or Large Reef Systems, Equipment or Livestock, you'll be able to find your group here.

      Find A Group

      Suggestions

      This is YOUR site, so if you have suggestions or feedback on how we can improve it for you, please let us know! We do our best to keep up!
       

       

      Make A Suggestion

      Get Started

      In just a few steps you'll be able to connect with other members, join and create groups, start a conversation and more.  It only takes a minute and is completely free to join.

      Join ReefChat

       

      Copyright 2010 by ReefChat.org - A reef keeping communityTerms Of UsePrivacy Statement
      belstaff jackethandbags ukprada handbagshandbags salemulberry handbags coach handbags belstaff jacketsbelstaff shop miu miu handbagshandbags on sale