Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

The Examples

Scott Smith edited this page Jan 1, 2018 · 13 revisions

elm-time Examples

This README covers knowledge conveyed in these two examples and how to set up your system to build and run them.

Feature Highlights

For elm-time

  • How to use Elm flags to retrieve an initial time from Javacript.
  • The differences working with utc-only and time zones.

For Elm in General

  • The (!) function, a syntactic shortcut, is used to format the return of the init function. Defined here. Discussion here.

Installation

Prerequisites

Name Version Installation
elm >= 0.18.0 Install
node v8.9.3 node dist
npm 5.5.1 Included as part of node install above
elm-live >= v2.7.5 npm install -g elm-live
uglify-js >= 3.3.4 npm install -g uglify-js

Install and Run

  1. cd into your Elm projects' folder
  2. Perform the following commands:
    git clone git@github.com:elm-community/elm-time.git
    cd elm-time
    elm-make
    cd examples/with-timezone   # or examples/without-timezone
    make                        # May take a minute or two if uglifying for the first time
    elm-live --output=index.min.js Main.elm --open
  3. Observe the following browser screen for with-timezone example: with_timezone
  4. Observe the following browser screen for without-timezone example: with_timezone

Clone this wiki locally