How do I display todays date in Node.js Jade?

前端 未结 7 1377
囚心锁ツ
囚心锁ツ 2021-01-31 15:04

I am new to Node.js and Jade and I have tried to use #{Date.now()} and it\'s giving me numbers. How do I display the date in mm/dd/yy format?

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 16:06

    add the class .post-date to a tag holding the date

    document.addEventListener('DOMContentLoaded', function() {
        var list = document.getElementsByClassName('post-date');
                    // get the number of selected elements
    
                    // iterate over elements and output their HTML content
                    for (var i=0; i

提交回复
热议问题