If you want to stay in touch + hear about new tools/resources, signup here →
Copy the expression below and paste into your text layer’s Source Text
property.
// Set the initial date
initialDate = new Date('December 17, 2024 09:00:00');
// Calculate the number of weeks to add based on the layer's index
weeksToAdd = thisLayer.index - 1;
// Add the weeks to the initial date
newDate = new Date(initialDate.getTime() + weeksToAdd * 7 * 24 * 60 * 60 * 1000);
// Get day of the week
daysOfWeek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
dayOfWeek = daysOfWeek[newDate.getDay()];
// Get month name
monthsOfYear = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
month = monthsOfYear[newDate.getMonth()];
// Get day, year, and time
day = newDate.getDate();
year = newDate.getFullYear();
// Format the time
hours = newDate.getHours();
minutes = newDate.getMinutes();
amPm = hours >= 12 ? "PM" : "AM";
formattedHours = hours % 12 || 12; // Convert to 12-hour format
formattedMinutes = ("0" + minutes).slice(-2);
// Combine into the desired format
dayOfWeek + ", " + month + " " + day + ", " + year + " at " + formattedHours + ":" + formattedMinutes + " " + amPm;