You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
Currently, most of angular-moment's filters accept a preprocessor and format parameter. Over the time, the filters accumulated additional arguments, and now we have amDifferenceFilter which accepts 5 positional parameters (and another one suggested by #124 / #172).
What I have in mind for the next release (0.11.0) is a breaking change that will replace the concept of preprocessors with designated filters and will also remove support for specifying custom input date format from all the directives.
Instead, there will be designated filters that will take care of transforming string and unix-timestamp values into moments objects.
Which is a little bit more verbose, but in my opinion more readable and greatly simplifies all the filters, as they will no longer have to worry about the input format and preprocessors.
Any thoughts?
The text was updated successfully, but these errors were encountered:
urish
changed the title
Removal of preprocessors, custom input format
BREAKIGN CHANGE: preprocessors, custom input format and timezone become filters
Sep 13, 2015
urish
changed the title
BREAKIGN CHANGE: preprocessors, custom input format and timezone become filters
BREAKING CHANGE: preprocessors, custom input format and timezone become filters
Sep 14, 2015
Currently, most of angular-moment's filters accept a preprocessor and format parameter. Over the time, the filters accumulated additional arguments, and now we have
amDifferenceFilter
which accepts 5 positional parameters (and another one suggested by #124 / #172).What I have in mind for the next release (0.11.0) is a breaking change that will replace the concept of preprocessors with designated filters and will also remove support for specifying custom input date format from all the directives.
Instead, there will be designated filters that will take care of transforming string and unix-timestamp values into moments objects.
Thus, the following:
someDate | amDifference:otherDate:'minute':true:'unix':'unix'
Will become:
`someDate | amFromUnix | amDifference:(otherDate|amFromUnix):'minute':true)
Which is a little bit more verbose, but in my opinion more readable and greatly simplifies all the filters, as they will no longer have to worry about the input format and preprocessors.
Any thoughts?
The text was updated successfully, but these errors were encountered: