All Projects → rajasegar → ember-dayjs-helpers

rajasegar / ember-dayjs-helpers

Licence: MIT license
Ember Template helpers based on day.js

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ember-dayjs-helpers

dayjs
Extended fork of Day.js - 2KB immutable date library alternative to Moment.js
Stars: ✭ 36 (+89.47%)
Mutual labels:  datetime, date, dayjs
lit-date
Light-weight, faster datetime formatter for modern browsers.
Stars: ✭ 33 (+73.68%)
Mutual labels:  datetime, date, format
format-date
📆 A small library (around 400 B when gziped & minified) to format JavaScript `Date` object using same tokens as moment.
Stars: ✭ 25 (+31.58%)
Mutual labels:  datetime, date, format
date-php
这是一个Javascript模仿PHP日期时间格式化函数,使用方法和PHP非常类似,有丰富的模板字符,并在原来的基础上增加了一些模板字符。 This is a date function that implement PHP in Javascript. It is very similar to PHP, has rich template characters, and enhances some template characters on the basis of the original.
Stars: ✭ 24 (+26.32%)
Mutual labels:  datetime, date, format
Dayjs
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
Stars: ✭ 37,373 (+196600%)
Mutual labels:  datetime, date, dayjs
Time Stamp
Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
Stars: ✭ 104 (+447.37%)
Mutual labels:  datetime, date, format
Tinydate
A tiny (349B) reusable date formatter. Extremely fast!
Stars: ✭ 990 (+5110.53%)
Mutual labels:  datetime, date, format
Gostradamus
Gostradamus: Better DateTimes for Go 🕰️
Stars: ✭ 148 (+678.95%)
Mutual labels:  datetime, date, format
date-extractor
Extract dates from text
Stars: ✭ 58 (+205.26%)
Mutual labels:  datetime, date
timelite
String date and time utilities 🕙
Stars: ✭ 17 (-10.53%)
Mutual labels:  date, format
qrono
🕥 Just right date time library
Stars: ✭ 111 (+484.21%)
Mutual labels:  datetime, date
fmtdate
MS Excel (TM) syntax for Go time/date
Stars: ✭ 95 (+400%)
Mutual labels:  datetime, date
react-calendar-datetime-picker
A simple and fast date and time picker component for React
Stars: ✭ 58 (+205.26%)
Mutual labels:  datetime, date
persiantools
Jalali date and datetime with other tools
Stars: ✭ 101 (+431.58%)
Mutual labels:  datetime, date
hs-hourglass
efficient and simpler time API for haskell
Stars: ✭ 43 (+126.32%)
Mutual labels:  datetime, date
react-modern-datepicker
A modern date picker for react library
Stars: ✭ 19 (+0%)
Mutual labels:  date, dayjs
rutimeparser
Recognize date and time in russian text and return datetime.datetime.
Stars: ✭ 17 (-10.53%)
Mutual labels:  datetime, date
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (+0%)
Mutual labels:  date, format
date-format
A reliable way to format dates and times in Elm.
Stars: ✭ 48 (+152.63%)
Mutual labels:  date, format
shamsi date
A Flutter and Dart package for using Jalali (Shamsi, Solar, Persian or Jalaali) calendar. You can convert, format and manipulate Jalali and Gregorian (Miladi) date and times.
Stars: ✭ 59 (+210.53%)
Mutual labels:  datetime, date

ember-dayjs-helpers

Build and Deploy Coverage Status semantic-release npm version EmberObserver

30+ Ember.js template helpers based on day.js, a fast 2kB alternative to Moment.js with the same modern API

Installation

ember install ember-dayjs-helpers

Usage

View the Demo page for more examples.

Using in templates

{{ day-js }} => Display today's date
{{ day-js date='2019-01-25' format='DD-MM-YYYY'}} => 25-01-2019
{{ day-js date='2019-01-25' format='DD MMMM YYYY'}} => 25 January 2019

Using inside Javascript

import dayjs from 'dayjs';
...
const yesterday = dayjs().subtract(1, 'day').toString()
const tomorrow = dayjs().add(1, 'day').toString()
const lastWeek = dayjs().subtract(1, 'week').toString()
const nextWeek = dayjs().add(1, 'week').toString()
const lastMonth = dayjs().subtract(1, 'month').toString()
const nextMonth = dayjs().add(1, 'month').toString()
const lastYear = dayjs().subtract(1, 'year').toString()
const nextYear = dayjs().add(1, 'year').toString()

Helpers

Display Helpers

  • day-js
  • dayjs-format
  • dayjs-from
  • dayjs-from-now
  • dayjs-to
  • dayjs-to-now
  • dayjs-calendar
  • dayjs-diff
  • days-in-month
  • dayjs-date
  • dayjs-day-of-week
  • dayjs-weekday
  • dayjs-day-of-year
  • dayjs-week-of-year

Manipulate Helpers

  • dayjs-add
  • dayjs-subtract
  • dayjs-start-of
  • dayjs-end-of

Query Helpers

  • dayjs-is-before
  • dayjs-is-same
  • dayjs-is-after
  • dayjs-is-same-or-before
  • dayjs-is-same-or-after
  • dayjs-is-between
  • dayjs-is-leap-year

i18n Helpers

  • dayjs-weekdays
  • dayjs-weekdays-short
  • dayjs-weekdays-min
  • dayjs-months
  • dayjs-months-short

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].