Skip to content

an elm package made for working with simple date format

Notifications You must be signed in to change notification settings

ThalissonMelo/SimpleDate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleDate

All functionalities are explained in the SimpleDate module.

Example

For a working example, check out the Example file

{ simpleDate = {day = Nothing, month = Nothing, year = Nothing}

This is a instance of simpleDate type.

update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
    case msg of
      UpdateField field value ->
          let
            newDate = dateUpdate model.simpleDate field value
          in
            {model | simpleDate = newDate} ! []

Here you can work with the "dateUpdate" function alongside with a message type. field is the type that you want to edit, passed as a string. types can be:

  • "day"
  • "month"
  • "year"

About

an elm package made for working with simple date format

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elm 96.0%
  • HTML 4.0%