[WIP] Fix duplicate date functions. Implements #10220

Do not merge. Pending feedback on solution.

@MorrisJobke 
Maybe use something like http://usejsdoc.org/tags-deprecated.html