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

Option to set the time format for the reports #158

Closed
heiningair opened this issue Jun 15, 2024 · 2 comments · Fixed by #165
Closed

Option to set the time format for the reports #158

heiningair opened this issue Jun 15, 2024 · 2 comments · Fixed by #165
Assignees

Comments

@heiningair
Copy link

Is your feature request related to a problem? Please describe.
As I understand this the report assumes the time format should be truncated to a per day level ("2006-01-02"), is that correct?

starting at line 104 - line 110

            data.addRow([
                new Date("{{ .Format "2006-01-02" }}"),
                {{ range $.Columns }}
                {{ .Value }},
                {{ end }}
            ]);
            {{ end }}

Does this mean it wouldnt work for data that has another resolution than days, e.g. hourly, or 1-minute data?

Describe the solution you'd like
a way to set another format for the dates, so that it can be any type of date resolution. Maybe make it configurable on the Backtest instance?!

would be super cool to have that

@cinar
Copy link
Owner

cinar commented Jun 17, 2024

This a great idea. I will make it configurable.

@cinar
Copy link
Owner

cinar commented Jun 30, 2024

You can use this starting with v2.0.5. Please re-open if it doesn't work as you expected. Thank you for the feature request!

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

Successfully merging a pull request may close this issue.

2 participants