Skip to content

Instantly share code, notes, and snippets.

@fogonwater
Last active December 30, 2025 21:04
Show Gist options
  • Select an option

  • Save fogonwater/fcc016803e48cba6de316289bd1c2b60 to your computer and use it in GitHub Desktop.

Select an option

Save fogonwater/fcc016803e48cba6de316289bd1c2b60 to your computer and use it in GitHub Desktop.
Obsidian Templater daily journal prompts with moon phase

Daily Journal Entry Template for Obsidian

A Templater template for daily journal entries with auto-calculated moon phases.

Inserts the current date in human-readable format and calculates the moon phase based on a known new moon anchor (December 20, 2025, Wellington NZ). The template uses end-of-day evaluation so the displayed phase matches the entire day.

Requirements: Templater community plugin for Obsidian

Usage: Insert this template into your journal note to add a new daily entry with automatic date, suggested prompts, and moon phase population.

## <% tp.date.now("dddd, D MMMM YYYY") %>
**Moon:** <%*
const moonPhases = [
'πŸŒ‘ New Moon',
'πŸŒ’ Waxing Crescent',
'πŸŒ“ First Quarter',
'πŸŒ” Waxing Gibbous',
'πŸŒ• Full Moon',
'πŸŒ– Waning Gibbous',
'πŸŒ— Last Quarter',
'🌘 Waning Crescent'
];
// Wellington anchor: New Moon 20 Dec 2025 at 2:43 p.m (local time)
const anchor = new Date(2025, 11, 20, 14, 43, 0, 0); // Jan=0. Dec = 11
const lunarCycle = 29.53059;
const msPerDay = 86400000;
// Date evaluated end-of-day so phase "flips on the date it happens"
const [Y, M, D] = tp.date.now("YYYY-MM-DD").split("-").map(Number);
const day = new Date(Y, M - 1, D, 23, 59, 59, 999);
const daysSinceAnchor = (day - anchor) / msPerDay;
// New Moon corresponds to 0.00 through the cycle
let cyclePos = (daysSinceAnchor / lunarCycle);
// Normalise to [0, 1)
cyclePos = ((cyclePos % 1) + 1) % 1;
// Bucket into 8 phases; round to nearest bucket and wrap
const phaseIndex = (Math.round(cyclePos * 8) % 8);
// tR is Templater's output variable
tR += moonPhases[phaseIndex];
%>
**Mood:**
**Sleep quality:**
**Listened to:**
**Worked on:**
**Interesting thing:**
<hr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment