Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeAgo pipe should work for valid string date #224

Open
ouassimBenMosbah opened this issue May 30, 2022 · 6 comments
Open

TimeAgo pipe should work for valid string date #224

ouassimBenMosbah opened this issue May 30, 2022 · 6 comments

Comments

@ouassimBenMosbah
Copy link

I'm submitting a ...

[ ] bug report
[X] feature request
  • Ngx-pipes version: 2.7.8

Current behavior
When passing a string to the timeAgo pipe, it returns invalid date even if the string correspond to a date.

Expected behavior
If the string is a valid date it should convert it to a date and act as if it was a date

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-e5cldc?file=src/app/app.component.ts

  • Angular version: 12.X.X
rahuldimri added a commit to rahuldimri/ngx-pipes that referenced this issue Jun 14, 2022
It is common use-case to provide date as a valid string. Even the backend responses come as a plain string which represents the date.
@Halynsky
Copy link

Halynsky commented Jul 1, 2022

By the way in docs, string is the input type
image
Fun thing is that this is the most common use case, but it's not implemented.

@rahuldimri
Copy link

I have modified the code and added the feature.

@danrevah
Copy link
Owner

Anyone wants to take this?

@rahuldimri
Copy link

Anyone wants to take this?

I think you are the only one who is having write access 😀

@Halynsky
Copy link

Halynsky commented Nov 8, 2022

@danrevah As I understand the solution is already prepared by @rahuldimri. Can it be integrated into the main code?

@Halynsky
Copy link

Hello. Any updates about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants