Skip to content

Instantly share code, notes, and snippets.

@jeansordes
Last active August 27, 2025 19:30
Show Gist options
  • Select an option

  • Save jeansordes/4dca3bcd3921a5b6b8201b494971a812 to your computer and use it in GitHub Desktop.

Select an option

Save jeansordes/4dca3bcd3921a5b6b8201b494971a812 to your computer and use it in GitHub Desktop.
Obsidian Templater + Dataview Weekly Note

<%* let firstDay = moment(tp.file.title, '[journal.]gggg.[weeks.]ww'); let week = [ firstDay, // 0 = Lundi firstDay.clone().add(1,'d'), // 1 = M firstDay.clone().add(2,'d'), // 2 = Me firstDay.clone().add(3,'d'), // 3 = J firstDay.clone().add(4,'d'), // 4 = V firstDay.clone().add(5,'d'), // 5 = S firstDay.clone().add(6,'d'), // 6 = D ]; let capitalize = (val) => (String(val).charAt(0).toUpperCase() + String(val).slice(1)); -%>

created: <% week[0].format("YYYY-MM-DD") %>

Semaine du <% week[0].format("D") + ' au ' + week[6].format("D MMMM YYYY") %>

Déroulé - timeline

<%* for (let i = 0; i < 7; i++) { -%>

= choice("<% week[i].format("YYYY-MM-DD") %>" = dateformat(date(today),"yyyy-MM-dd"), "👉", "") <% capitalize(week[i].format("dddd D MMMM YYYY")) %>

<%* } -%>

@jeansordes
Copy link
Author

CleanShot 2025-08-27 at 21 27 10@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment