Skip to content

New Year Countdown in Elixir #5

@emson

Description

@emson

The puzzle is to create a countdown timer that displays the number of Days:Hours:Minutes:Seconds until the next New Year. This countdown timer will decrease every cond until 000:00:00:00.
See the website for more details : http://elixirgolf.com/articles/new-year-countdown-in-elixir/

  • The code will be executed using the elixir countdown.exs terminal command. We will manually copy all your solutions into this file, so just add comments below to submit your solutions.
  • The timer will be in the following format Days:Hours:Minutes:Seconds
  • The time should be represented as numbers, separated by colons: 000:00:00:00
  • Every second the timer should decrease by 1 second, and all the other fields should adjust accordingly.
  • The timer should only display one timer at any time, i.e. it should have some mechanism to clear the screen or update itself every second. It should NOT display a long list of times, like the example above.
  • The timer should countdown to the next New Year e.g. January 1st 2016.

As a bit of fun and a side project maybe consider the following flourishes:

  • Colour the numbers
  • Allow the countdown timer to dynamically adjust to the following New Year after this one
  • Trigger some exciting output when the countdown reaches 000:00:00:00.
  1. Please add your solutions as comments to this Github issue
  2. Remember to add your Twitter handle (I will link to it if you get a mention)
    Many thanks, Ben
    When the puzzle is over I'll write them up on http://elixirgolf.com and link back to your Twitter handle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions