mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-06-07 05:57:41 +00:00
Add weeks
This commit is contained in:
parent
3e0f5fe544
commit
6171fbbcb8
1 changed files with 9 additions and 3 deletions
|
@ -27,9 +27,9 @@ if (widgetInputRAW !== null) {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const localeText = {
|
const localeText = {
|
||||||
default: ['Day', 'Days'],
|
default: ['Day', 'Days', 'weeks'],
|
||||||
en: ['Day', 'Days'],
|
en: ['Day', 'Days', 'Weeks'],
|
||||||
de: ['Tag', 'Tage'],
|
de: ['Tag', 'Tage', 'Wochen'],
|
||||||
fr: ['Jour', 'Jours'],
|
fr: ['Jour', 'Jours'],
|
||||||
es: ['día', 'días'],
|
es: ['día', 'días'],
|
||||||
it: ['giorno', 'giorni']
|
it: ['giorno', 'giorni']
|
||||||
|
@ -55,6 +55,7 @@ function getTimeRemaining(endtime){
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
let remainingDays = getTimeRemaining(dateForCountdown).days + 1;
|
let remainingDays = getTimeRemaining(dateForCountdown).days + 1;
|
||||||
|
let remainingWeeks = Math.round(remainingDays /7);
|
||||||
|
|
||||||
// Create Widget
|
// Create Widget
|
||||||
let widget = new ListWidget();
|
let widget = new ListWidget();
|
||||||
|
@ -99,6 +100,11 @@ if (remainingDays === 1) {
|
||||||
}
|
}
|
||||||
postfixText.font = Font.regularSystemFont(20)
|
postfixText.font = Font.regularSystemFont(20)
|
||||||
postfixText.textColor = textColor;
|
postfixText.textColor = textColor;
|
||||||
|
let provider2 = widget.addText(remainingWeeks+ " " + (t[2]))
|
||||||
|
provider2.font = Font.mediumSystemFont(16)
|
||||||
|
provider2.textColor = textColor
|
||||||
|
provider2.centerAlignText()
|
||||||
|
textStack.addSpacer()
|
||||||
|
|
||||||
textStack.addSpacer()
|
textStack.addSpacer()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue