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

Strange behaviour of timesince filter #28

Open
sgrignard opened this issue Apr 27, 2016 · 1 comment
Open

Strange behaviour of timesince filter #28

sgrignard opened this issue Apr 27, 2016 · 1 comment

Comments

@sgrignard
Copy link

Hello.
I'm using the timesince filter and I'm getting a strange behaviour with these input/templates.
When outputting directly the times they are correct but using them through timesince doesn't work ?
By the way I added support of seconds to timesince which I will propose as a pull request if you're interested in.

Regards,

Sébastien Grignard.

example.zip

@sgrignard
Copy link
Author

Ok, I got it, I didn't convert the time strings into QDateTime instances in the context I gave to Grantlee.
But what is a bit strange is that the behaviour is not the same for the input and the argument:

  • for the input it's ok to give a ISODate formatted string (which is converted to QDateTime by QVariant::value).
  • for the argument it must be a QDateTime instance.
    Maybe it would be better to have the same behaviour for both ?

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

1 participant