Shorten the weekday name/date on Lockscreen clock [answered]
As the title suggests, how do I shorten the Weekday name on the Lockscreen?, I don't understand the mechanism for time/day/date construction using QML in Sailfish.
For example, I want to reduce each Weekday name down to 3 letters only; `Sun, Mon; Tue; Wed; Thu; Fri, Sat' and eventually, reduce the date to one line.
The text in the relevant Clock.qml
file gives this line of text;
text: {
var day = Format.formatDate(time, Format.WeekdayNameStandalone)
return day[0].toUpperCase() + day.substring(1)
The above code simply returns; Saturday
- but I'd like to see Sat 30 Jul
For the month, the text also in Clock.qml gives this line;
text: Format.formatDate(time, Format.DateMediumWithoutYear)
The above simply displays; 30 Jul
which is what I'm after, as previously described.
Any info appreciated
isnt there a subString(startpos,length) ?
i would try day =day.substring(0,3)
pawel ( 2016-07-30 17:22:48 +0200 )editThanks @pawel, you may well be right, but meanwhile, I have worked out another way and have achieved what I was after; the date in short form, i.e.
Spam Hunter ( 2016-07-30 18:01:40 +0200 )editSat 30 Jul
.