Ruby : generate a date range

30 Nov 2012


    This is a simple post just to demonstrate how to get all the valid dates in between two given dates. Consider the situation that you have to loop through each date between 2012-10-27 and 2012-11-03. Please find below the code which I used to achieve this.


Output :

Hope it helped you.
Thank you.
If you find my work helpful, You can buy me a coffee.