"Days Until Christmas" Script for geektool

Discussion in 'macOS' started by Hook'Em2006, Dec 4, 2011.

  1. Hook'Em2006 macrumors 6502

    Joined:
    Sep 9, 2009
    Location:
    Plano, TX
    #1
    Im looking for a script that will shows me the days until christmas. Any Help?
     
  2. mrgraff macrumors 6502a

    mrgraff

    Joined:
    Apr 18, 2010
    Location:
    Albuquerque
    #2
    THEN=`date -v11y -v25d -v12m +%s`
    SECS=$(($THEN-$(date +%s)))
    echo "Days: "$(($SECS/3600/24))
     
  3. Hook'Em2006 thread starter macrumors 6502

    Joined:
    Sep 9, 2009
    Location:
    Plano, TX
    #3
    I tried putting that into a shell script and nothing pulled up. :-/

    ----------

    Nevermind, I got it working. Thank you for your help!
     
  4. hayduek macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #4
    I've got the script "working" put all it outputs is "-2179". Any ideas?
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    Location:
    Sailing beyond the sunset
    #5
  6. hayduek macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #6
    Thanks! I figured it out. Problem was the year code was set to 2011. I changed it to '17 and now it's working just fine.

    75 days until the Trucks leave from Fenway to the Spring Training facility in Ft. Myers :D

    Now if I could just get a humidity only script :p
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    Location:
    Sailing beyond the sunset
    #7
    Changing it to 17 works for this year. Then you have to change it to 18 in 2018. And so on.

    The change I gave uses the current year, whatever it is, so no change needed in 2018, etc.
     
  8. hayduek macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #8
    Ah! Thanks for the clue!
    Any idea how to extract just the humidity level from accuweather.com?
     

Share This Page