How to override `date` behavior

Hi, I am using a page with format below:

title: "ABC"
author: ABC
date: 2018/12/05-06,2018/12/18-19-20

As you can see, the date is not a date time format, but hugo still treat it as date data type, and it will became to “” when i reference it in template, and my question is how do I just treat it as string, I don’t want to let it convert to date actually. and I can’t change it to other field name, it is a exist system already using this name, any tips?
Thanks in advance.

date: “2018/12/05-06,2018/12/18-19-20”

reconfigure date usage in config

It is always a bad solution to overwrite the buildin functions.

Certain words are reserved. If you want it to be a string that you parse, call it something other than the inbuilt Date function, like MyDate or whatever.

1 Like

@ju52 I check out the config document already, and I tried config the config.toml,

date = ["publishDate", "lastmod"]

but seems it doesn’t work, date field still go through validation as Date type, is there some place are hard coded, could you help to provide a link?

@RickCogley understand and totally agreed with you but the date is already widely used in our exist content system, and the problem is that i can’t change it how it is using.

Thanks for the help.