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

The Examples

Scott Smith edited this page Sep 8, 2018 · 13 revisions

elm-time Examples

This page 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.

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

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 --warn
    cd examples/with-timezone   # or examples/without-timezone
  3. For elm18 installations:
    elm-live --output=index.js Main.elm --open --warn
  4. For elm19 installations:
    elm-live Main.elm --open -- --output=index.js
  5. Browse http://localhost:8000 and observe the following browser screen for with-timezone example:
    with_timezone
    Change to a different timezone in the dropdown and observe how the ISO8601 rendering changes.
  6. Browse http://localhost:8000 and observe the following browser screen for without-timezone example:
    with_timezone