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

Unsupported type DateOnly in .Net 7.0+ #535

Open
heggi opened this issue Nov 26, 2023 · 0 comments
Open

Unsupported type DateOnly in .Net 7.0+ #535

heggi opened this issue Nov 26, 2023 · 0 comments

Comments

@heggi
Copy link

heggi commented Nov 26, 2023

Dotliquid version

2.2.692

Expected behavior

Render DateOnly as string and it needs to be compatible with date filter

Actual behavior

Got error Liquid syntax error: Object '30.11.2023' is invalid because it is neither a built-in type nor implements ILiquidizable

Steps to reproduce the Problem (you can add files)

var rendered = DotLiquid.Template
    .Parse("{{ MyDate }}")
    .Render(DotLiquid.Hash.FromAnonymousObject(new
    {
        MyDate = new DateOnly(2023, 11, 30),
    }), CultureInfo.GetCultureInfo("ru-RU"));

Console.WriteLine(rendered);
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