Skip to content

Default output of a {{ DateTime }} is different to JS implementation #292

Closed

Description

@arrkaye

Using a DateTime in a template seems to just call ToString() on the DateTime, whereas in JS it output the ISO string.

This feels wrong. Is it?

Activity

  1. rexm commented on Mar 28, 2019

    @rexm
    Member

    Since our goal is functional and behavioral parity with the JS library, yes it is almost certainly wrong :) Unfortunately now that we have over a million installs, we are limited in the kinds of non-backwards-compatible changes we can roll out while we're still under version 1.x

    Version 2.0 is percolating in my head and will have a lot of breaking changes to address these things.

  2. arrkaye commented on Mar 29, 2019

    @arrkaye
    Author

    Sounds great! Is there a way to introduce this particular change (or a mechanism for us to address these kinds of issues) in the current version, without breaking all the current users clients?

    Perhaps allowing the injection of a custom object or property on the Handlebars configuration?

  3. rexm commented on Mar 29, 2019

    @rexm
    Member

    The simplest thing to do would be to use a helper

  4. 304NotModified commented on Aug 5, 2019

    @304NotModified
    Contributor

    If we change this, it would be nice to allow us the format the date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions