Git Product home page Git Product logo

ember-luxon's Introduction

Hi there ๐Ÿ‘‹

ember-luxon's People

Contributors

buschtoens avatar cibernox avatar dependabot-support avatar dependabot[bot] avatar ember-tomster avatar jasonmit avatar philippgrieser avatar terminalstar avatar willrax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ember-luxon's Issues

Remove ember-rollup

When attempting to upgrade to ember-cli 2.18, we get an error at the build stage:
screen shot 2018-01-18 at 17 42 31

The log file suggests rollup is the cause and removing ember-luxon results in a successful build.

Feature Request: Ember Data Transform

A feature that is not supported by ember-moment, but is available as additional addon.

Ember Data has a date transform that deserializes ISO dates to native Date() objects. Having a similar transform that provides Luxon objects instead is highly desired as it makes sense to have any occurrence of calendrical data in one format (especially given the welcome deviations in Luxon).

Given that luxon has multiple data structures, this addon should provide a transform for any reasonable variant.

Feature Request: Computed Property Macros

ember-moment provides a few macros which deliver computed properties for various variants that can even be composed together: duration, humanize, locale, tz, format, calendar, moment, toNow, fromNow.

More details in their Computed Property Macro Documentation

I think it's reasonable to provide at least the same or event a larger set of helpers in the same fashion to make it easier to convert projects to Luxon.

maintainers?

Does this repo need maintainers to get things merged in a timely manner?

Change Request: Consider providing luxon as direct import, maybe in additional addon

Ember-Moment and others allow you to import the library they shim by name, i.e.

import 'moment' from 'moment';

I think doing the same with this addon might be useful, comparing

import { DateTime } from 'ember-luxon/luxon'; 
// vs
import { DateTime } from 'luxon'; 

The current option, while it safeguards against namespace collisions feels rather unnatural given that Luxon is provided as a ES6 module and uses the latter option in their own documentation.

Dependabot couldn't reach artifacts.netflix.com as it timed out

Dependabot couldn't reach artifacts.netflix.com as it timed out.

Is artifacts.netflix.com accessible over the internet? If it is then this may be a transitory issue and can be ignored - Dependabot will close it on its next successful update run.

You can mention @dependabot in the comments below to contact the Dependabot team.

Not compatible with Ember-CLI 3.2.x

Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/settings.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/duration.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/interval.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/info.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js

Build Error (broccoli-persistent-filter:Babel > [Babel: PROJECTNAME]) in luxon.js

luxon.js: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null

Stack Trace and Error Report: /var/folders/sk/f8z9r_gd3qx0ycfccdxbfd7c0000gn/T/error.dump.406a591d1c334e86c29e015452028671.log

I'll try to fix this in our fork and will try to provide a PR.

Feature Request: Support automatic import of polyfills where required

First of all, thank you very much for rewarding my laziness and creating this addon for me. Or in a more serious way: Thanks for doing this, it's much appreciated.

As we plan to move to Luxon for our next projects, I'd love to help making this a full fledged replacement solution for ember-moment.

Luxon requires rather new browsers. In case support for legacy browsers is requires, either Intl.js or support for time zones has to be polyfilled as described in the Luxon documentation

This addon should provide options to automatically polyfill these features based on the targets.js provided by Ember-CLI or based on options set in ember-cli-build.js.

  • Provide Polyfills based on targets.js
    • Use local polyfills
    • Use polyfill.io
  • Allow configuration overrides in ember-cli-build.js

(Any of my feature requests could also be moved to a separate addon, lets discuss!)

Feature Request: Provide template helpers for formatting dates

ember-moment provides a range of helpers:
https://github.com/stefanpenner/ember-moment#helpers

{{moment '12-25-1995' 'MM-DD-YYYY'}}
{{moment-format '12-25-1995' 'MM/DD/YYYY' 'MM-DD-YYYY'}} {{!-- outputFormat and inputFormat are optional --}}
{{moment-from-now (now) hideSuffix=true}} {{!-- hideSuffix is optional --}}
{{moment-to-now (unix timeStamp) date hidePrefix=true}} {{!-- hidePrefix is optional --}}
{{moment-duration number units}} {{!-- units is optional --}}
{{moment-calendar date referenceDate}} {{!-- reference date is optional --}}
{{moment-diff dateA dateB precision='day' float=true}} {{!-- precision is optional, float is optional --}}
{{is-before date comparison precision='year'}} {{!-- precision is optional --}}
{{is-after date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same-or-before date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same-or-after date comparison precision='year'}} {{!-- precision is optional --}}
{{is-between date comparisonA comparisonB precision='year' inclusivity='[)'}} {{!-- precision is optional, inclusivity optional  --}}

ember-luxon should provide similar drop-in replacements to make it easier to switch.

  • {{luxon '12-25-1995' 'MM-DD-YYYY'}}
  • {{luxon-format '12-25-1995' 'MM/DD/YYYY' 'MM-DD-YYYY'}} {{!-- outputFormat and inputFormat are optional --}}
  • {{luxon-duration number units}} {{!-- units is optional --}}
  • {{luxon-diff dateA dateB precision='day' float=true}} {{!-- precision is optional, float is optional --}}
  • {{is-before date comparison precision='year'}} {{!-- precision is optional --}}
  • {{is-after date comparison precision='year'}} {{!-- precision is optional --}}
  • {{is-same date comparison precision='year'}} {{!-- precision is optional --}}
  • {{is-same-or-before date comparison precision='year'}} {{!-- precision is optional --}}
  • {{is-same-or-after date comparison precision='year'}} {{!-- precision is optional --}}
  • {{is-between date comparisonA comparisonB precision='year' inclusivity='[)'}} {{!-- precision is optional, inclusivity optional --}}

Not supported by Luxon:

{{moment-calendar date referenceDate}} {{!-- reference date is optional --}}
{{moment-from-now (now) hideSuffix=true}} {{!-- hideSuffix is optional --}}
{{moment-to-now (unix timeStamp) date hidePrefix=true}} {{!-- hidePrefix is optional --}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.