WIP. inline doesn't work, but the rest does.
This commit is contained in:
10
main.ts
10
main.ts
@@ -443,16 +443,16 @@ export default class MyPlugin extends Plugin {
|
|||||||
const partialMonthDays = Math.round((nextBirthday.getTime() - refDate.getTime()) / oneDay);
|
const partialMonthDays = Math.round((nextBirthday.getTime() - refDate.getTime()) / oneDay);
|
||||||
if (partialMonthDays > 15) monthsUntil += 0.5;
|
if (partialMonthDays > 15) monthsUntil += 0.5;
|
||||||
|
|
||||||
msg = `${possessive} birthday is in ${monthsUntil} months.`;
|
msg = `next one is in ${monthsUntil} months.`;
|
||||||
} else if (daysUntil === 0) {
|
} else if (daysUntil === 0) {
|
||||||
msg = `wish ${pronoun} Happy Birthday!`;
|
msg = `Today! Wish ${pronoun} Happy Birthday!`;
|
||||||
} else if (daysUntil === 1) {
|
} else if (daysUntil === 1) {
|
||||||
msg = `${possessive} birthday is tomorrow!`;
|
msg = `that's tomorrow!`;
|
||||||
} else {
|
} else {
|
||||||
msg = `next one in ${daysUntil} days.`;
|
msg = `next one is in ${daysUntil} days.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
container.setText(`${name !== null ? name + ": " : ageLabel } ${age}. Birthday is ${birthdayFormatted}—${msg}`);
|
container.setText(`${name !== null ? name + ": " : ageLabel } ${age} years old. Birthday is ${birthdayFormatted}—${msg}`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'countdown':
|
case 'countdown':
|
||||||
|
|||||||
Reference in New Issue
Block a user