Helpers and Transforms - adamkendis/ember-discography GitHub Wiki

Helpers

  • Html input with type="date" provide a date format of 'YYYY-MM-DD'
  • Display format for dates is 'MM/DD/YYYY'

format-date-year-first

  • Reformats date string from 'MM/DD/YYYY' to 'YYYY-MM-DD'

format-date-year-last

  • Reformats date string from 'YYYY-MM-DD' to 'MM/DD/YYYY'

Transform

time-string

  • Serializes a time string 'MM:ss' into an integer (time in seconds)
  • Deserializes an integer (time in seconds) into a time string 'MM:ss'