@@ -21,6 +29,7 @@ const props = defineProps({
]"
:data-date="props.day.date"
>
+ {{ formattedDate }}
{{ props.day.displayText }}
{{ props.day.lunarPhase }}
@@ -32,59 +41,68 @@ const props = defineProps({
diff --git a/src/utils/date.js b/src/utils/date.js
index a8dc414..f98e103 100644
--- a/src/utils/date.js
+++ b/src/utils/date.js
@@ -192,6 +192,17 @@ function formatTodayString(date) {
return formatted.charAt(0).toUpperCase() + formatted.slice(1)
}
+/**
+ * Format date as compact string for day cell corner (e.g., "Mon 15 Jan")
+ */
+function formatDateCompact(date) {
+ return date.toLocaleDateString(undefined, {
+ weekday: 'short',
+ day: 'numeric',
+ month: 'short'
+ }).replace(", ", " ")
+}
+
export {
// constants
monthAbbr,
@@ -218,6 +229,7 @@ export {
formatDateRange,
formatDateShort,
formatDateLong,
+ formatDateCompact,
formatTodayString,
lunarPhaseSymbol,
// iso helpers re-export