04-09-2018 08:59
04-09-2018 08:59
I have in my styles.css the following
#myDate {
font-size: 35;
font-family: Colfax-Medium;
text-length: 20;
text-anchor: middle;
x: 50%;
y: 0%+131;
fill: #f8fcf8;
}
but not sure if that has to do with how my date is displayed, right now it shows
"Day, Date/Month/Year" (Mo, 09/04/2018)
I would just like the month and date to swap.... (Day, Month/Date/Year) but I looked in all the scripts and couldnt find where to find that unless I have to code that in somewhere...help!
Best Answer04-10-2018 04:39
04-10-2018 04:39
Rearrange them in the code you set the date string.
Best Answer04-17-2018 22:06
04-17-2018 22:06
i used a template and did some tweaks like changing the background only but I can’t find anywhere that shows the format for the date...only some codes that refer to it.
Best Answer04-18-2018 02:15
04-18-2018 02:15
Can you paste the code here please?
Best Answer04-18-2018 07:52
04-18-2018 07:52
This is some of my code and it's based on one of the samples, so hopefully similar!
function updateClock() {
let today = new Date();
let hours = today.getHours();
let mins = util.zeroPad(today.getMinutes());
let day = today.getDate();
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
let month = months[today.getMonth()];
timeText.text = `${hours}:${mins}`;
dateText.text = `${day} ${month}`;
}This sets the text string called "dateText" in my SVG file to be the day followed by the month. Changing this around will swap them. eg.
function updateClock() {
let today = new Date();
let hours = today.getHours();
let mins = util.zeroPad(today.getMinutes());
let day = today.getDate();
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
let month = months[today.getMonth()];
timeText.text = `${hours}:${mins}`;
dateText.text = `${month} ${day}`;
}
Best Answer