(offset)
| 770 | |
| 771 | // Return UTC string "YYYYMMDD" for today + offset |
| 772 | const getUTCDay = function (offset) { |
| 773 | if (offset == null) { offset = 0 } |
| 774 | const day = new Date() |
| 775 | day.setDate(day.getUTCDate() + offset) |
| 776 | const partYear = day.getUTCFullYear() |
| 777 | let partMonth = (day.getUTCMonth() + 1) |
| 778 | if (partMonth < 10) { partMonth = '0' + partMonth } |
| 779 | let partDay = day.getUTCDate() |
| 780 | if (partDay < 10) { partDay = '0' + partDay } |
| 781 | return `${partYear}${partMonth}${partDay}` |
| 782 | } |
| 783 | |
| 784 | // Fast, basic way to replace text in an element when you don't need much. |
| 785 | // http://stackoverflow.com/a/4962398/540620 |
nothing calls this directly
no outgoing calls
no test coverage detected