This template allows you to easily create a super dynamic daily routine. Use [this](https://www.icloud.com/shortcuts/c047d8f7b99342b395a2911fabb4b5c2) IOS shortcut to generate alarms from your daily generated planner.
**Templater Template:**
```js
---
completed: false
publish: false
---
<%*
/* === Date Helpers === */
Date.prototype.addDays = function(days) {
const date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
}
const tomorrow = (new Date()).addDays(1);
const tomorrowDay = tomorrow.getDay();
const tomorrowDate = tomorrow.getDate();
const currentYear = tomorrow.getFullYear();
/* === Time Block System === */
let currentTime = 60 * 3 - 5; // starting from 2:55am
function renderBlock(title, items) {
let output = `**${title}**\n`;
for (let [duration, name] of items) {
let startMin = currentTime;
let endMin = currentTime + duration;
let startHour = Math.floor(startMin / 60);
let startMinute = startMin % 60;
let startAm = startHour < 12;
let endHour = Math.floor(endMin / 60);
let endMinute = endMin % 60;
let endAm = endHour < 12;
let format = (h, m, am) => `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}${am ? 'am' : 'pm'}`;
output += `${format(startHour, startMinute, startAm)} - ${format(endHour, endMinute, endAm)} / ${name}\n`;
currentTime = endMin;
}
return output + '\n';
}
/* === Example Blocks === */
// Define your own routines here
function createMorningRoutine() {
return renderBlock("morning routine", [
[10, "example task"],
[5, "another task"]
]);
}
function createWorkBlock() {
return renderBlock("work session", [
[60, "focus work"],
[15, "short break"]
]);
}
function createEveningRoutine() {
return renderBlock("evening routine", [
[30, "relaxing time"],
[10, "prepare for sleep"]
]);
}
/* === Build Output === */
let output = "";
output += createMorningRoutine();
output += createWorkBlock();
output += createEveningRoutine();
output += `\n\n#### Habit Tracker
- [ ] example habit 1
- [ ] example habit 2
- [ ] example habit 3`;
output += `\n\n![[goals/${currentYear}|Goals - ${currentYear}]]`;
tR += output;
%>
```
**Example Output:**
```js
---
completed: false
publish: false
---
**morning routine**
02:55am - 03:05am / example task
03:05am - 03:10am / another task
**work session**
03:10am - 04:10am / focus work
04:10am - 04:25am / short break
**evening routine**
04:25am - 04:55am / relaxing time
04:55am - 05:05am / prepare for sleep
#### Habit Tracker
- [ ] example habit 1
- [ ] example habit 2
- [ ] example habit 3
![[goals/2025|Goals - 2025]]
```