sebastienros/fluid

Time conversion problem

Closed this issue · 4 comments

var source = "date:"{{Date | date:'%F %T.%3N'}}"";

image

%3N does not take effect , 是什么问题呢?

Of course, use format_ Date is OK
| format_date:'yyyy-MM-ddTHH:mm:ss.fffZ'

Could you please try before this commit?

If I can chime in (I was busy doing some other datetime work):

@hishamco - Does not look like %N is handled - I can't see a test case at:

public async Task Date(string format, string expected)

and case 'N' doesn't appear to be handled by MiscFilters.Date:

public static ValueTask<FluidValue> Date(FluidValue input, FilterArguments arguments, TemplateContext context)

@huangyedie - You could use %L instead of %3N as a work around.

You are right, I looked though the code it wasn't handled

thank you