Localization of date in header/footer
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.3.0
- Platform / OS version: Windows 10
- URLs (if applicable): …
- Node.js version: 9.11.1
What steps will reproduce the problem? Using date in header/footer.
Please include code that reproduces the issue.
await page.pdf({
//..
displayHeaderFooter: true,
headerTemplate: '<p></p>',
footerTemplate: '<span class="date"></span>',
margin: { bottom: '60px' }
});
What is the expected result? 18-04-2018
What happens instead? 4/18/2018
Or simply put… I’m located in The Netherlands where date’s are normally formatted like dd-MM-yyyy. Is it possible to get some kind of localization in the header/footer?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Localization of date in header/footer · Issue #2408 - GitHub
I'm located in The Netherlands where date's are normally formatted like dd-MM-yyyy. Is it possible to get some kind of localization in the...
Read more >Insert the date or time in a header or footer - Microsoft Support
Insert the current date in the header or footer · On the View menu, click Header and Footer. · Click the Print Settings...
Read more >22183 – Cannot change date format in header/footer
When inserting a date field in either the header or footer of a spreadsheet, the default OOo format MM/DD/YYYY is used. No regard...
Read more >Date format from header/footer token - MuseScore
Do we have any control of how the date is formatted when we use the '$D' ... Do you mean the locale as...
Read more >How to insert current date and time in Excel cell/header/footer?
Then the current date and time are inserted in header/footer. ... B: Select the location you want to place the inserted information.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yrshaikh Hmm… Strangely for a moment I was looking at the templates as being some static kind of thing in stead of being programmable. Sometimes you get blind for something and hold on to it. Thanks for the input. I’ll close the issue.
Later, I stored the value in a variable first, and then used ${print_this_date} instead of ${new Date().toDateString()}