I recently found a bit of Ruby which creates a function to output the date of next Saturday (or whatever day you feed it):
require 'date' def date_of_next() date = Date.parse("Saturday") delta = date > Date.today ? 0 : 7 date + delta end
As you can see, it's super-compact. Would it be an easy task to translate this into Liquid? (I'd have thought it's possible, seeing as Liquid is apparently based on Ruby - or am I wrong? I'm very new to this!)
Solved! Go to the solution
This is an accepted solution.