-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
type casting: convert int <-> int64 #620
Comments
It would be useful if you posted the sample that DOESN'T work, and not just the working one. |
Ha, sorry about that. I replaced {{ if ge (add 86400 .Date.Unix) .Now.Unix }} |
There has been fixes related to this done on several of the template methods (can't remember which); I just tested your construction on the latest code and it works fine. |
Awesome, I was thinking I should start running the dev version anyway. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This might be related to #255.
Take this template example from the Hugo docs:
Suppose I want to trigger the conditional if .Date.Unix plus a day (86,400 seconds) is greater than .Now.Unix. I tried
add 86400 .Date.Unix
, but I get the following error:How do I convert .Date.Unix to
int
, or 86400 toint64
?The text was updated successfully, but these errors were encountered: