Matthew Daly's Blog

I'm a web developer in Norfolk. This is my blog...

28th September 2014 7:53 pm

Changing Date Format from DD/MM/YYYY to YYYY-MM-DD in Vim

Recently I had the occasion to reformat a load of dates in Vim from DD/MM/YYYY to YYYY-MM-DD. In Vim, this is quite simple:

:%s/\(\d\{2}\)\/\(\d\{2}\)\/\(\d\{4}\)/\3-\2-\1/g

This should be easy to adapt to reformatting other date formats.

Recent Posts

Creating a Caching User Provider for Laravel

Adding Opensearch Support to Your Site

Easy Repositories and Decorators With Laravel Repositories

Creating Laravel Helpers

Getting the Type of An Unsupported Postgres Field in Laravel

About me

I'm a web and mobile app developer based in Norfolk. My skillset includes Python, PHP and Javascript, and I have extensive experience working with CodeIgniter, Laravel, Django, Phonegap and Angular.js.