ember-datetime-fns
v1.1.1
Published
This addon provides date and time helpers for Ember templates and components.
Downloads
4
Readme
ember-datetime-fns
This addon provides date and time helpers for Ember templates and components.
To install:
ember install ember-datetime-fns
Usage
datetime-get-date
datetime-get-day
datetime-get-full-year
datetime-get-hours
datetime-get-milliseconds
datetime-get-minutes
datetime-get-month
datetime-get-seconds
datetime-get-time
datetime-get-timezone-offset
datetime-get-utc-date
datetime-get-utc-day
datetime-get-utc-full-year
datetime-get-utc-hours
datetime-get-utc-minutes
datetime-get-utc-month
datetime-get-utc-seconds
datetime-now
datetime-to-date-string
datetime-to-iso-string
datetime-to-locale-date-string
datetime-to-locale-string
datetime-to-locale-time-string
datetime-to-time-string
datetime-to-utc-string
datetime-get-date
Return the day of month. See Date.getDate() for details on the Date.getDate() function.
{{datetime-get-date value}}
datetime-get-day
Return the day of week. See Date.getDay() for details on the Date.getDay() function.
{{datetime-get-day value}}
datetime-get-full-year
Return the year. See Date.getFullYear() for details on the Date.getFullYear() function.
{{datetime-get-full-year value}}
datetime-get-hours
Return the hour of day. See Date.getHours() for details on the Date.getHours() function.
{{datetime-get-hours value}}
datetime-get-milliseconds of second
Return the milliseconds of second. See Date.getMilliseconds() for details on the Date.getMilliseconds() function.
{{datetime-get-milliseconds value}}
datetime-get-minutes
Return the minutes of hour. See Date.getMinutes() for details on the Date.getMinutes() function.
{{datetime-get-minutes value}}
datetime-get-month
Return the month of year. See Date.getMonth() for details on the Date.getMonth() function.
{{datetime-get-month value}}
datetime-get-seconds
Return the seconds of minute. See Date.getSeconds() for details on the Date.getSeconds() function.
{{datetime-get-seconds value}}
datetime-get-time
Return the milliseconds since the unix epoch. See Date.getTime() for details on the Date.getTime() function.
{{datetime-get-time value}}
datetime-get-timezone-offset
Return the timezone offset. See Date.getTimezoneOffset() for details on the Date.getTimezoneOffset() function.
{{datetime-get-timezone-offset value}}
datetime-get-utc-date
Return the UTC day of month. See Date.getUTCDate() for details on the Date.getUTCDate() function.
{{datetime-get-utc-date value}}
datetime-get-utc-day
Return the UTC day of week. See Date.getUTCDay() for details on the Date.getUTCDay() function.
{{datetime-get-utc-day value}}
datetime-get-utc-full-year
Return the UTC year. See Date.getUTCFullYear() for details on the Date.getUTCFullYear() function.
{{datetime-get-utc-full-year value}}
datetime-get-utc-hours
Return the UTC hour of day. See Date.getUTCHours() for details on the Date.getUTCHours() function.
{{datetime-get-utc-hours value}}
datetime-get-utc-minutes
Return the UTC minutes of hour. See Date.getUTCMinutes() for details on the Date.getUTCMinutes() function.
{{datetime-get-utc-minutes value}}
datetime-get-utc-month
Return the UTC month of year. See Date.getUTCMonth() for details on the Date.getUTCMonth() function.
{{datetime-get-utc-month value}}
datetime-get-utc-seconds
Return the UTC seconds of minute. See Date.getUTCSeconds() for details on the Date.getUTCSeconds() function.
{{datetime-get-utc-seconds value}}
datetime-now
Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. See Date.now() for details on the Date.now() function.
{{datetime-now}}
datetime-to-date-string
Return the date string. See Date.toDateString() for details on the Date.toDateString() function.
{{datetime-to-date-string value}}
datetime-to-iso-string
Return the ISO string. See Date.toISOString() for details on the Date.toISOString() function.
{{datetime-to-iso-string value}}
datetime-to-locale-date-string
Return the locale formatted date. See Date.toLocaleDateString() for details on the Date.toLocaleDateString() function.
{{datetime-to-locale-date-string locale value (hash
"localeMatcher"="best fit"
"year"="numeric"
"month"="long"
"day"="numeric")
}}
datetime-to-locale-string
Return the locale formatted date and time. See Date.toLocaleString() for details on the Date.toLocaleString() function.
{{datetime-to-locale-string locale value (hash
"localeMatcher"="best fit"
"year"="numeric"
"month"="long"
"day"="numeric",
"hour"="numeric",
"minute"="numeric",
"second"="numeric",
"hour12"=true)
}}
datetime-to-locale-time-string
Return the locale formatted time. See Date.toLocaleTimeString() for details on the Date.toLocaleTimeString() function.
{{datetime-to-locale-time-string locale value (hash
"localeMatcher"="best fit"
"hour"="numeric",
"minute"="numeric",
"second"="numeric",
"hour12"=true)
}}
datetime-to-time-string
Return the time string. See Date.toTimeString() for details on the Date.toTimeString() function.
{{datetime-to-time-string value}}
datetime-to-utc-string
Return the UTC string. See Date.toUTCString() for details on the Date.toUTCString() function.
{{datetime-to-utc-string value}}
Related Addons
- See ember-array-fns for array based helpers.
- See ember-intl-fns for internationalization based helpers.
- See ember-logic-fns for logical based helpers.
- See ember-math-fns for math based helpers.
- See ember-number-fns for number based helpers.
- See ember-string-fns for string based helpers.
Compatibility
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.