How do I create a Ruby date object from a string? February 6, 2023 by Tarik Date.parse('31-12-2010') Alternatively Date#strptime(str, format).