Skip to content

Instantly share code, notes, and snippets.

View AyoLaja's full-sized avatar
🛋️
Working

Ayomide Onalaja AyoLaja

🛋️
Working
View GitHub Profile
@mark47
mark47 / datatables.datetime-flex.js
Last active March 18, 2019 06:18
Plugin for jQuery Datatables sorting of US-style date and time. Requires month, day and year. Time is optional and can be in 12 or 24 hour formats. Properly parses mm/m, dd/d and yyyy/yy.
/**
* DataTables plug-in to handle U.S.-style dates. Requires month day year.
* Time is optional and can be in 12 or 24 hour formats.
* Properly parses mm/m, dd/d and yyyy/yy.
*
* Based on original datetime-us plugin by Kevin Gravier.
*
* @name Flexible US Datetime
* @summary Sort dates and times in US mm/dd/yyyy with optional time.
* @author Mark Stewart